PEP: Clone payloads to allow plugins to reuse stanzas.

Thu, 22 Oct 2009 02:13:02 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Thu, 22 Oct 2009 02:13:02 +0500
changeset 2042
34e6e06dd089
parent 2041
8cf9b978ab36
child 2043
c0784614b66f

PEP: Clone payloads to allow plugins to reuse stanzas.

plugins/mod_pep.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_pep.lua	Thu Oct 22 02:12:24 2009 +0500
+++ b/plugins/mod_pep.lua	Thu Oct 22 02:13:02 2009 +0500
@@ -134,7 +134,7 @@
 				local node = payload.attr.node;
 				payload = payload.tags[1];
 				if payload then -- <item>
-					publish(session, node, payload);
+					publish(session, node, st.clone(payload));
 					session.send(st.reply(stanza));
 					return true;
 				end

mercurial