Software /
code /
prosody
Comparison
plugins/muc/mod_muc.lua @ 8659:4006755c1097
MUC: Log failure to load room state
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 16 Mar 2018 21:59:41 +0100 |
parent | 8658:75c7e887c4b9 |
child | 8660:3b54f8472b51 |
comparison
equal
deleted
inserted
replaced
8658:75c7e887c4b9 | 8659:4006755c1097 |
---|---|
156 local function restore_room(jid) | 156 local function restore_room(jid) |
157 local node = jid_split(jid); | 157 local node = jid_split(jid); |
158 local data, err = room_configs:get(node); | 158 local data, err = room_configs:get(node); |
159 if data then | 159 if data then |
160 module:log("debug", "Restoring room %s from storage", jid); | 160 module:log("debug", "Restoring room %s from storage", jid); |
161 local state = room_state:get(node); | 161 local state, s_err = room_state:get(node); |
162 if not state and s_err then | |
163 module:log("debug", "Could not restore state of room %s: %s", jid, s_err); | |
164 end | |
162 local room = muclib.restore_room(data, state); | 165 local room = muclib.restore_room(data, state); |
163 return track_room(room); | 166 return track_room(room); |
164 elseif err then | 167 elseif err then |
165 module:log("error", "Error restoring room %s from storage: %s", jid, err); | 168 module:log("error", "Error restoring room %s from storage: %s", jid, err); |
166 local room = muclib.new_room(jid, { locked = math.huge }); | 169 local room = muclib.new_room(jid, { locked = math.huge }); |