mirror of
https://gitverse.ru/kpa39l/icq.git
synced 2026-09-29 01:50:10 +00:00
fix: mod_privilege на Prosody 0.11 — стаб-ACK вместо module:send_iq (0.12 API); контакты TG целы в ростере (1602)
This commit is contained in:
@@ -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 <IQ>: %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)
|
||||
|
||||
Reference in New Issue
Block a user