MUC: Abort module loading if unable to get list of persistent rooms from storage (fixes #1091)
--- a/plugins/muc/mod_muc.lua Sat Mar 10 20:49:52 2018 +0100
+++ b/plugins/muc/mod_muc.lua Wed Mar 07 16:01:58 2018 +0100
@@ -37,7 +37,11 @@
rooms = {};
local rooms = rooms;
local persistent_rooms_storage = module:open_store("persistent");
-local persistent_rooms = persistent_rooms_storage:get() or {};
+local persistent_rooms, err = persistent_rooms_storage:get();
+if not persistent_rooms then
+ assert(not err, err);
+ persistent_rooms = {};
+end
local room_configs = module:open_store("config");
-- Configurable options