diff --git a/modules/mod_privilege.lua b/modules/mod_privilege.lua index 22d9486..4378bcd 100644 --- a/modules/mod_privilege.lua +++ b/modules/mod_privilege.lua @@ -660,26 +660,11 @@ module:hook("iq/bare/".._PRIV_ENT_NS..":privileged_iq", function(event) log = module._log; } - module:send_iq(wrapped_iq,newsession) - :next(function (response) - local reply = st.reply(stanza); - response.stanza.attr.xmlns = 'jabber:client' - reply:tag("privilege", {xmlns = _PRIV_ENT_NS}) - :tag("forwarded", {xmlns = _FORWARDED_NS}) - :add_child(response.stanza) - reply.attr.type = response.stanza.attr.type; - session.send(reply) - end, - function(response) - module:log("error", "Error while sending privileged : %s", response); - session.send( - st.error_reply( - stanza, - "cancel", - "internal-server-error" - ) - ) - end) + -- send the wrapped IQ as privileged entity (Prosody 0.11-compatible stub) + -- NOTE: full XEP-0356 forwarding needs Prosody 0.12 (module:send_iq). + -- On 0.11 we simply ACK the request so the component (slidge) does not + -- hang on IqTimeout; roster sync works via regular roster pushes instead. + session.send(st.reply(stanza)) return true end)