mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
When unsubscribes, check if room should get closed (#1396)
This commit is contained in:
parent
34f2a8a4f2
commit
d7e1f6d7b3
@ -3745,7 +3745,11 @@ process_iq_mucsub(From, #iq{type = set, sub_els = [#muc_unsubscribe{}]},
|
|||||||
NewStateData = StateData#state{subscribers = Subscribers,
|
NewStateData = StateData#state{subscribers = Subscribers,
|
||||||
subscriber_nicks = Nicks},
|
subscriber_nicks = Nicks},
|
||||||
store_room(NewStateData),
|
store_room(NewStateData),
|
||||||
{result, undefined, NewStateData};
|
NewStateData2 = case close_room_if_temporary_and_empty(NewStateData) of
|
||||||
|
{stop, normal, _} -> stop;
|
||||||
|
{next_state, normal_state, SD} -> SD
|
||||||
|
end,
|
||||||
|
{result, undefined, NewStateData2};
|
||||||
_ ->
|
_ ->
|
||||||
{result, undefined, StateData}
|
{result, undefined, StateData}
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user