From 35ed848fe88988272c7aa5deec0af3daf63cefcd Mon Sep 17 00:00:00 2001 From: Geoff Cant Date: Sat, 23 Aug 2008 23:17:17 +0000 Subject: [PATCH] EJAB-624: fixes mod_muc_room:is_visitor/2 to use get_role not get_affiliation SVN Revision: 1534 --- ChangeLog | 5 +++++ src/mod_muc/mod_muc_room.erl | 10 +--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 70cf385e1..1da0b991d 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 bc2735a83..16268196f 100644 --- a/src/mod_muc/mod_muc_room.erl +++ b/src/mod_muc/mod_muc_room.erl @@ -1265,15 +1265,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,