mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
Make mod_muc_room:unsubscirbe handle that unsubscribe may stop room
This commit is contained in:
parent
63e3fb92d1
commit
97354426cf
@ -741,10 +741,13 @@ handle_sync_event({muc_subscribe, From, Nick, Nodes}, _From,
|
|||||||
{error, Err} ->
|
{error, Err} ->
|
||||||
{reply, {error, get_error_text(Err)}, StateName, StateData}
|
{reply, {error, get_error_text(Err)}, StateName, StateData}
|
||||||
end;
|
end;
|
||||||
handle_sync_event({muc_unsubscribe, From}, _From, StateName, StateData) ->
|
handle_sync_event({muc_unsubscribe, From}, _From, StateName,
|
||||||
|
#state{config = Conf} = StateData) ->
|
||||||
IQ = #iq{type = set, id = p1_rand:get_string(),
|
IQ = #iq{type = set, id = p1_rand:get_string(),
|
||||||
from = From, sub_els = [#muc_unsubscribe{}]},
|
from = From, sub_els = [#muc_unsubscribe{}]},
|
||||||
case process_iq_mucsub(From, IQ, StateData) of
|
case process_iq_mucsub(From, IQ, StateData) of
|
||||||
|
{result, _, stop} ->
|
||||||
|
{stop, ok, normal, StateData#state{config = Conf#config{persistent = false}}};
|
||||||
{result, _, NewState} ->
|
{result, _, NewState} ->
|
||||||
{reply, ok, StateName, NewState};
|
{reply, ok, StateName, NewState};
|
||||||
{ignore, NewState} ->
|
{ignore, NewState} ->
|
||||||
|
Loading…
Reference in New Issue
Block a user