aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-04-18 19:26:26 +0200
committerKim Alvefur <zash@zash.se>2016-04-18 19:26:26 +0200
commit850bf3dc9ed3aed9942f56e0e61cd1be4d51748e (patch)
tree5ed9a3084571bc888b5116b6461dd92e36b1b35a /plugins/muc/muc.lib.lua
parent0907621d2f7e4114cc7c54714e9c72adb27e5ee7 (diff)
downloadprosody-850bf3dc9ed3aed9942f56e0e61cd1be4d51748e.tar.gz
prosody-850bf3dc9ed3aed9942f56e0e61cd1be4d51748e.zip
MUC: Move room deserialization to muc.lib
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r--plugins/muc/muc.lib.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index a7a96865..b289b8ce 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -1252,6 +1252,13 @@ function room_mt:freeze()
}
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;