]> granicus.if.org Git - ejabberd/commitdiff
EJAB-624: fixes mod_muc_room:is_visitor/2 to use get_role not get_affiliation
authorGeoff Cant <geoff.cant@process-one.net>
Sat, 23 Aug 2008 23:23:51 +0000 (23:23 +0000)
committerGeoff Cant <geoff.cant@process-one.net>
Sat, 23 Aug 2008 23:23:51 +0000 (23:23 +0000)
SVN Revision: 1535

ChangeLog
src/mod_muc/mod_muc_room.erl

index 7065eac55ef10bf2c5d1411a8cd53aa6188733a2..5b324fe23d4d7e79c47f96473bd93caa604145e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-24  Geoff Cant  <gcant@process-one.net>
+
+       * src/mod_mud/mod_muc_room.erl: is_visitor/2 fix - use get_role
+       not get_affiliation
+
 2008-08-22  Badlop  <badlop@process-one.net>
 
        * src/ejabberd_router.erl: Fix call to mnesia match_object
index e795464915a02b8101cf196fccdd327db95d5430..e8b314c531fcda3e029bb0a0eac8eeab73e483d2 100644 (file)
@@ -1237,15 +1237,7 @@ get_default_role(Affiliation, StateData) ->
     end.
 
 is_visitor(Jid, StateData) ->
-    case get_affiliation(Jid, StateData) of
-        none ->
-            case get_default_role(none, StateData) of
-                visitor -> true;
-                _ -> false
-            end;
-        visitor -> true;
-        _ -> false
-    end.
+    get_role(Jid, StateData) =:= visitor.
 
 get_max_users(StateData) ->
     MaxUsers = (StateData#state.config)#config.max_users,