Diff

plugins/muc/muc.lib.lua @ 7367:2aef5e8b69e9

MUC: Move room deserialization to muc.lib
author Kim Alvefur <zash@zash.se>
date Mon, 18 Apr 2016 19:26:26 +0200
parent 7366:eb3928903009
child 7368:4e24aff1e4df
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Mon Apr 18 19:20:51 2016 +0200
+++ b/plugins/muc/muc.lib.lua	Mon Apr 18 19:26:26 2016 +0200
@@ -1252,6 +1252,13 @@
 	}
 end
 
+function _M.restore_room(frozen)
+	local room_jid = frozen.jid;
+	local room = _M.new_room(room_jid, frozen._data);
+	room._affiliations = frozen._affiliations;
+	return room;
+end
+
 _M.room_mt = room_mt;
 
 return _M;