# HG changeset patch # User Kim Alvefur # Date 1520434918 -3600 # Node ID 7e7aa0f770c73e52b3608886408506324672a565 # Parent 4b5a00fffb22c7e3637e9e8ca8ac4d68f0d6bd56 MUC: Abort module loading if unable to get list of persistent rooms from storage (fixes #1091) diff -r 4b5a00fffb22 -r 7e7aa0f770c7 plugins/muc/mod_muc.lua --- 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