aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-07-11 03:27:18 +0200
committerKim Alvefur <zash@zash.se>2018-07-11 03:27:18 +0200
commit2aeae813e21cf7e0ac5d5945cb31e33422a1c1b5 (patch)
tree01db0ce126dda669be36ea8493e50671c7e86521
parente6ad9f6b7886c2c0d144968048dd753273a25851 (diff)
downloadprosody-2aeae813e21cf7e0ac5d5945cb31e33422a1c1b5.tar.gz
prosody-2aeae813e21cf7e0ac5d5945cb31e33422a1c1b5.zip
MUC: Remove room state on successful restoration from disk
-rw-r--r--plugins/muc/mod_muc.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index 71b39eab..8cf6d23c 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -188,7 +188,12 @@ local function restore_room(jid)
module:log("debug", "Could not restore state of room %s: %s", jid, s_err);
end
local room = muclib.restore_room(data, state);
- return track_room(room);
+ if track_room(room) then
+ room_state:set(node, nil);
+ return room;
+ else
+ return false;
+ end
elseif err then
module:log("error", "Error restoring room %s from storage: %s", jid, err);
local room = muclib.new_room(jid, { locked = math.huge });