25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

Don't send unavailable presence when leaving occupant has other nicks in the room (EJAB-305)

This commit is contained in:
Badlop 2011-08-23 21:53:19 +02:00
parent 24c5063b99
commit c76bbdf16f

View File

@ -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)