From 42ca023dec0dc74cbe789dc1218f60e1ca89362d Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 17 Aug 2018 08:12:58 +0100 Subject: MUC: Fix traceback when failing to restore a room When a room exists in the DB but cannot be loaded (e.g. due to max_rooms or a pre-restore handler) restore_room()/get_room_from_jid() returns false. --- plugins/muc/mod_muc.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins/muc') diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua index df10ef76..4438803c 100644 --- a/plugins/muc/mod_muc.lua +++ b/plugins/muc/mod_muc.lua @@ -450,6 +450,9 @@ for event_name, method in pairs { else return; end + elseif room == false then -- Error loading room + origin.send(st.error_reply(stanza, "wait", "resource-constraint")); + return true; end return room[method](room, origin, stanza); end, -2) -- cgit v1.2.3