Software /
code /
prosody
Diff
plugins/muc/mod_muc.lua @ 8841:bc8558bbc797
MUC: Fix error logged when no persistent rooms present
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 30 May 2018 21:02:09 +0100 |
parent | 8705:1d66f66a13c9 |
child | 8843:041ddc670934 |
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua Wed May 30 10:58:19 2018 +0200 +++ b/plugins/muc/mod_muc.lua Wed May 30 21:02:09 2018 +0100 @@ -39,8 +39,11 @@ local persistent_rooms_storage = module:open_store("persistent"); local persistent_rooms, err = persistent_rooms_storage:get(); if not persistent_rooms then - module:log("error", "Error loading list of persistent rooms from storage. Reload mod_muc or restart to recover."); - assert(not err, err); + if err then + module:log("error", "Error loading list of persistent rooms from storage. Reload mod_muc or restart to recover."); + error("Storage error: "..err); + end + module:log("debug", "No persistent rooms found in the database"); persistent_rooms = {}; end local room_configs = module:open_store("config");