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 | cb9c562f0bd2fa155d9e0155248675d3d6874593 (patch) | |
tree | 201a8c06eca4d684a223149de3a05759c0a3163c /plugins/muc | |
parent | 8eaef0235b3b51d64b79f6dd0a740644f2c0841e (diff) | |
download | prosody-cb9c562f0bd2fa155d9e0155248675d3d6874593.tar.gz prosody-cb9c562f0bd2fa155d9e0155248675d3d6874593.zip |
MUC: Abort module loading if unable to get list of persistent rooms from storage (fixes #1091)
Diffstat (limited to 'plugins/muc')
-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 |