diff options
author | Kim Alvefur <zash@zash.se> | 2018-03-07 16:01:58 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-03-07 16:01:58 +0100 |
commit | 89f519b0a56ee2fdd16069ab4e45ae73aa883e26 (patch) | |
tree | 201a8c06eca4d684a223149de3a05759c0a3163c /plugins | |
parent | b70fd0eb44df2de8d47c14c79f3c366f9fa3ed92 (diff) | |
download | prosody-89f519b0a56ee2fdd16069ab4e45ae73aa883e26.tar.gz prosody-89f519b0a56ee2fdd16069ab4e45ae73aa883e26.zip |
MUC: Abort module loading if unable to get list of persistent rooms from storage (fixes #1091)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/muc/mod_muc.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua index 8c223cb2..bccd8915 100644 --- a/plugins/muc/mod_muc.lua +++ b/plugins/muc/mod_muc.lua @@ -37,7 +37,11 @@ local hosts = prosody.hosts; 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 |