25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-24 17:29:28 +01:00

Fix logic that determines room age when history_size=0

This commit is contained in:
Paweł Chmielowski 2020-11-18 16:40:53 +01:00
parent 1c6221d8a0
commit e306cb0797

View File

@ -891,9 +891,8 @@ decide_room(unused, {_Room_name, _Host, ServerHost, Room_pid}, Last_allowed) ->
end
end,
Ts_now = calendar:universal_time(),
HistorySize = mod_muc_opt:history_size(ServerHost),
{Has_hist, Last} = case p1_queue:is_empty(History) of
true when (HistorySize == 0) or (Just_created == true) ->
true when Just_created == true ->
{false, 0};
true ->
Ts_diff = (erlang:system_time(microsecond)