diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-08-17 08:12:58 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-08-17 08:12:58 +0100 |
commit | b31ffd4a55b7929c2f41cb4b5ae97feb9249143c (patch) | |
tree | 6804aa39befe73974b452f89bf21ba838e5a7c4f /plugins/muc/mod_muc.lua | |
parent | 305e161bc038799d5ad9c8ac836ebf1cf67ed0db (diff) | |
download | prosody-b31ffd4a55b7929c2f41cb4b5ae97feb9249143c.tar.gz prosody-b31ffd4a55b7929c2f41cb4b5ae97feb9249143c.zip |
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.
Diffstat (limited to 'plugins/muc/mod_muc.lua')
-rw-r--r-- | plugins/muc/mod_muc.lua | 3 |
1 files changed, 3 insertions, 0 deletions
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) |