Mercurial > prosody-modules
comparison mod_delegation/mod_delegation.lua @ 1722:c48c7f948cfb
mod_delegation: fixed namespace of <forwarded/> child element, as specified in XEP-0297
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 04 May 2015 18:43:17 +0200 |
parents | f49359330493 |
children | ef85c42ad977 |
comparison
equal
deleted
inserted
replaced
1721:f49359330493 | 1722:c48c7f948cfb |
---|---|
220 module:send(st.error_reply(original, 'cancel', 'service-unavailable')) | 220 module:send(st.error_reply(original, 'cancel', 'service-unavailable')) |
221 end | 221 end |
222 | 222 |
223 local function forward_iq(stanza, ns_data) | 223 local function forward_iq(stanza, ns_data) |
224 local to_jid = ns_data.connected | 224 local to_jid = ns_data.connected |
225 stanza.attr.xmlns = 'jabber:client' | |
225 local iq_stanza = st.iq({ from=module.host, to=to_jid, type="set" }) | 226 local iq_stanza = st.iq({ from=module.host, to=to_jid, type="set" }) |
226 :tag("delegation", { xmlns=_DELEGATION_NS }) | 227 :tag("delegation", { xmlns=_DELEGATION_NS }) |
227 :tag("forwarded", { xmlns=_FORWARDED_NS }) | 228 :tag("forwarded", { xmlns=_FORWARDED_NS }) |
228 :add_child(stanza) | 229 :add_child(stanza) |
229 local iq_id = iq_stanza.attr.id | 230 local iq_id = iq_stanza.attr.id |