mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
check if mod_mam is loaded before calling mod_mam:is_empty_for_room
This commit is contained in:
parent
a47c566b39
commit
f987db5a39
@ -839,7 +839,12 @@ decide_room(unused, {_Room_name, _Host, Room_pid}, ServerHost, Last_allowed) ->
|
|||||||
false
|
false
|
||||||
end;
|
end;
|
||||||
decide_room(empty, {Room_name, Host, _Room_pid}, ServerHost, _Last_allowed) ->
|
decide_room(empty, {Room_name, Host, _Room_pid}, ServerHost, _Last_allowed) ->
|
||||||
mod_mam:is_empty_for_room(ServerHost, Room_name, Host).
|
case gen_mod:is_loaded(ServerHost, mod_mam) of
|
||||||
|
true ->
|
||||||
|
mod_mam:is_empty_for_room(ServerHost, Room_name, Host);
|
||||||
|
_ ->
|
||||||
|
false
|
||||||
|
end.
|
||||||
|
|
||||||
seconds_to_days(S) ->
|
seconds_to_days(S) ->
|
||||||
S div (60*60*24).
|
S div (60*60*24).
|
||||||
|
Loading…
Reference in New Issue
Block a user