From e306cb07977521ef457c067782b6c0da8c93eec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Wed, 18 Nov 2020 16:40:53 +0100 Subject: [PATCH] Fix logic that determines room age when history_size=0 --- src/mod_muc_admin.erl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mod_muc_admin.erl b/src/mod_muc_admin.erl index 8ba07f83a..b5c8e7363 100644 --- a/src/mod_muc_admin.erl +++ b/src/mod_muc_admin.erl @@ -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)