# HG changeset patch # User Kim Alvefur # Date 1531272438 -7200 # Node ID a54bcc76cd228285c2dd41a138fff8379cfa1e7f # Parent 295faf1522f9a8ba22064f4f1656c30af5f8bec2 MUC: Remove room state on successful restoration from disk diff -r 295faf1522f9 -r a54bcc76cd22 plugins/muc/mod_muc.lua --- a/plugins/muc/mod_muc.lua Wed Jul 11 03:27:02 2018 +0200 +++ b/plugins/muc/mod_muc.lua Wed Jul 11 03:27:18 2018 +0200 @@ -188,7 +188,12 @@ 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 });