aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2011-08-23 21:53:19 +0200
committerBadlop <badlop@process-one.net>2011-08-23 21:53:19 +0200
commitc76bbdf16f9eb9f0ee4afeb1fb86bfbfd4b17ce1 (patch)
tree096cf9002c3c26d435abcbda0dd043d4dc98f528
parentAllow multiple entry with same nick to MUC rooms (thanks to Magnus Henoch)(EJ... (diff)
Don't send unavailable presence when leaving occupant has other nicks in the room (EJAB-305)
-rw-r--r--src/mod_muc/mod_muc_room.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mod_muc/mod_muc_room.erl b/src/mod_muc/mod_muc_room.erl
index f81611e1a..e7a9ba714 100644
--- a/src/mod_muc/mod_muc_room.erl
+++ b/src/mod_muc/mod_muc_room.erl
@@ -893,7 +893,10 @@ process_presence(From, Nick, {xmlelement, "presence", Attrs, _Els} = Packet,
end,
NewState =
add_user_presence_un(From, NewPacket, StateData),
- send_new_presence(From, NewState),
+ case ?DICT:find(Nick, StateData#state.nicks) of
+ {ok, [_, _ | _]} -> ok;
+ _ -> send_new_presence(From, NewState)
+ end,
Reason = case xml:get_subtag(NewPacket, "status") of
false -> "";
Status_el -> xml:get_tag_cdata(Status_el)