mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Merge remote-tracking branch 'processone/pr/2805'
* processone/pr/2805: only destroy rooms if mam is enabled
This commit is contained in:
commit
1aeb507114
@ -840,10 +840,16 @@ decide_room(unused, {_Room_name, _Host, Room_pid}, ServerHost, Last_allowed) ->
|
||||
end;
|
||||
decide_room(empty, {Room_name, Host, _Room_pid}, ServerHost, _Last_allowed) ->
|
||||
case gen_mod:is_loaded(ServerHost, mod_mam) of
|
||||
true ->
|
||||
mod_mam:is_empty_for_room(ServerHost, Room_name, Host);
|
||||
_ ->
|
||||
false
|
||||
true ->
|
||||
Room_options = get_room_options(Room_name, Host),
|
||||
case lists:keyfind(<<"mam">>, 1, Room_options) of
|
||||
{<<"mam">>, <<"true">>} ->
|
||||
mod_mam:is_empty_for_room(ServerHost, Room_name, Host);
|
||||
_ ->
|
||||
false
|
||||
end;
|
||||
_ ->
|
||||
false
|
||||
end.
|
||||
|
||||
seconds_to_days(S) ->
|
||||
|
Loading…
Reference in New Issue
Block a user