25
1
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:
Holger Weiss 2019-02-23 23:46:08 +01:00
commit 1aeb507114

View File

@ -841,9 +841,15 @@ decide_room(unused, {_Room_name, _Host, Room_pid}, ServerHost, Last_allowed) ->
decide_room(empty, {Room_name, Host, _Room_pid}, ServerHost, _Last_allowed) ->
case gen_mod:is_loaded(ServerHost, mod_mam) of
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) ->