util.stanza: Set preserialize as freeze metamethod
authorKim Alvefur <zash@zash.se>
Fri, 12 Oct 2018 00:52:18 +0200
changeset 9492 09b873ac7eb8
parent 9491 a96a2fbcc6c0
child 9493 6e4fbd12c11c
util.stanza: Set preserialize as freeze metamethod
util/stanza.lua
--- a/util/stanza.lua	Fri Oct 12 00:51:56 2018 +0200
+++ b/util/stanza.lua	Fri Oct 12 00:52:18 2018 +0200
@@ -359,6 +359,8 @@
 	return s;
 end
 
+stanza_mt.__freeze = preserialize;
+
 local function deserialize(stanza)
 	-- Set metatable
 	if stanza then