# HG changeset patch # User Kim Alvefur # Date 1460924928 -7200 # Node ID 3409773ca19a57f00e64ce16b212c3dc1720e826 # Parent 7a37fade5380c795dc610bd810943f7b4e2a134e# Parent a5a080c12c96b3c465f5898f6cf297e9d6d0828f Merge with Link Mauve diff -r a5a080c12c96 -r 3409773ca19a plugins/muc/mod_muc.lua --- a/plugins/muc/mod_muc.lua Sat Apr 16 21:08:05 2016 +0100 +++ b/plugins/muc/mod_muc.lua Sun Apr 17 22:28:48 2016 +0200 @@ -102,11 +102,7 @@ local is_persistent = persistent.get(room); persistent_rooms:set(nil, room.jid, is_persistent); if is_persistent then - local data = { - jid = room.jid; - _data = room._data; - _affiliations = room._affiliations; - }; + local data = room:freeze(); room_configs:set(node, data); elseif forced then room_configs:set(node, nil); diff -r a5a080c12c96 -r 3409773ca19a plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Sat Apr 16 21:08:05 2016 +0100 +++ b/plugins/muc/muc.lib.lua Sun Apr 17 22:28:48 2016 +0200 @@ -1235,6 +1235,14 @@ }, room_mt); end +function room_mt:freeze() + return { + jid = self.jid; + _data = self._data; + _affiliations = self._affiliations; + } +end + _M.room_mt = room_mt; return _M; diff -r a5a080c12c96 -r 3409773ca19a plugins/muc/subject.lib.lua --- a/plugins/muc/subject.lib.lua Sat Apr 16 21:08:05 2016 +0100 +++ b/plugins/muc/subject.lib.lua Sun Apr 17 22:28:48 2016 +0200 @@ -82,6 +82,7 @@ if role_rank >= valid_roles.moderator or ( role_rank >= valid_roles.participant and get_changesubject(event.room) ) then -- and participant set_subject(event.room, occupant.nick, subject:get_text()); + room:save(); return true; else event.origin.send(st.error_reply(stanza, "auth", "forbidden"));