MUC: Move 'preserialization' step to muc.lib
[prosody.git] / plugins / muc / muc.lib.lua
index 42a0af25c9062c5b44281af4f5e4ab1a805c72c8..2026bc4717c668adc0def9bf16712c6767e8eefd 100644 (file)
@@ -1235,6 +1235,14 @@ function _M.new_room(jid, config) -- luacheck: ignore 212
        }, 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;