aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/mod_muc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/muc/mod_muc.lua')
-rw-r--r--plugins/muc/mod_muc.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index d9d8fa2e..979aed8c 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -230,7 +230,15 @@ function each_room(local_only)
coroutine.yield(room);
seen[room.jid] = true;
end
- for room_jid in pairs(persistent_rooms_storage:get(nil) or {}) do
+ local all_persistent_rooms, err = persistent_rooms_storage:get(nil);
+ if not all_persistent_rooms then
+ if err then
+ module:log("error", "Error loading list of persistent rooms, only rooms live in memory were iterated over");
+ module:log("debug", "%s", debug.traceback(err));
+ end
+ return nil;
+ end
+ for room_jid in pairs(all_persistent_rooms) do
if not seen[room_jid] then
local room = restore_room(room_jid);
if room then