Diff

plugins/muc/mod_muc.lua @ 7360:7a37fade5380

MUC: Move 'preserialization' step to muc.lib
author Kim Alvefur <zash@zash.se>
date Sun, 17 Apr 2016 22:09:44 +0200
parent 7350:24e2369b67f9
child 7361:3409773ca19a
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua	Fri Apr 15 18:03:55 2016 +0200
+++ b/plugins/muc/mod_muc.lua	Sun Apr 17 22:09:44 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);