# HG changeset patch # User Matthew Wild # Date 1534489978 -3600 # Node ID 1403c64ca140b030f82b4805a03b8ee07a44e3e8 # Parent 5192adc5c47ff981015ba6dc1858f5b142df5684 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. diff -r 5192adc5c47f -r 1403c64ca140 plugins/muc/mod_muc.lua --- a/plugins/muc/mod_muc.lua Fri Aug 17 00:31:24 2018 +0200 +++ b/plugins/muc/mod_muc.lua Fri Aug 17 08:12:58 2018 +0100 @@ -450,6 +450,9 @@ 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)