From: Geoff Cant Date: Sat, 23 Aug 2008 23:23:51 +0000 (+0000) Subject: EJAB-624: fixes mod_muc_room:is_visitor/2 to use get_role not get_affiliation X-Git-Tag: v2.0.2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2cda62dceb25e0eea473edb7dae2d16074f604b1;p=ejabberd EJAB-624: fixes mod_muc_room:is_visitor/2 to use get_role not get_affiliation SVN Revision: 1535 --- diff --git a/ChangeLog b/ChangeLog index 7065eac55..5b324fe23 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-08-24 Geoff Cant + + * src/mod_mud/mod_muc_room.erl: is_visitor/2 fix - use get_role + not get_affiliation + 2008-08-22 Badlop * src/ejabberd_router.erl: Fix call to mnesia match_object diff --git a/src/mod_muc/mod_muc_room.erl b/src/mod_muc/mod_muc_room.erl index e79546491..e8b314c53 100644 --- a/src/mod_muc/mod_muc_room.erl +++ b/src/mod_muc/mod_muc_room.erl @@ -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,