Software /
code /
prosody
Changeset
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 |
parents | 8840:4a5ff09887a4 |
children | 8842:463505cc75d5 |
files | plugins/muc/mod_muc.lua |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
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");