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.
This commit is contained in:
Matthew Wild 2018-08-17 08:12:58 +01:00
parent 88962f49f4
commit 42ca023dec

View file

@ -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)