Diff

plugins/muc/mod_muc.lua @ 8702:7e7aa0f770c7

MUC: Abort module loading if unable to get list of persistent rooms from storage (fixes #1091)
author Kim Alvefur <zash@zash.se>
date Wed, 07 Mar 2018 16:01:58 +0100
parent 8025:8a7c4497569a
child 8703:416b8ae3857d
line wrap: on
line diff
--- 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