Comparison

plugins/mod_pep.lua @ 2042:34e6e06dd089

PEP: Clone payloads to allow plugins to reuse stanzas.
author Waqas Hussain <waqas20@gmail.com>
date Thu, 22 Oct 2009 02:13:02 +0500
parent 2041:8cf9b978ab36
child 2043:c0784614b66f
comparison
equal deleted inserted replaced
2041:8cf9b978ab36 2042:34e6e06dd089
132 payload = payload.tags[1]; 132 payload = payload.tags[1];
133 if payload and (payload.name == 'publish' or payload.name == 'retract') and payload.attr.node then -- <publish node='http://jabber.org/protocol/tune'> 133 if payload and (payload.name == 'publish' or payload.name == 'retract') and payload.attr.node then -- <publish node='http://jabber.org/protocol/tune'>
134 local node = payload.attr.node; 134 local node = payload.attr.node;
135 payload = payload.tags[1]; 135 payload = payload.tags[1];
136 if payload then -- <item> 136 if payload then -- <item>
137 publish(session, node, payload); 137 publish(session, node, st.clone(payload));
138 session.send(st.reply(stanza)); 138 session.send(st.reply(stanza));
139 return true; 139 return true;
140 end 140 end
141 end 141 end
142 end 142 end