mirror of
https://gitverse.ru/kpa39l/icq.git
synced 2026-09-29 09:55:11 +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;
|
log = module._log;
|
||||||
}
|
}
|
||||||
|
|
||||||
module:send_iq(wrapped_iq,newsession)
|
-- send the wrapped IQ as privileged entity (Prosody 0.11-compatible stub)
|
||||||
:next(function (response)
|
-- NOTE: full XEP-0356 forwarding needs Prosody 0.12 (module:send_iq).
|
||||||
local reply = st.reply(stanza);
|
-- On 0.11 we simply ACK the request so the component (slidge) does not
|
||||||
response.stanza.attr.xmlns = 'jabber:client'
|
-- hang on IqTimeout; roster sync works via regular roster pushes instead.
|
||||||
reply:tag("privilege", {xmlns = _PRIV_ENT_NS})
|
session.send(st.reply(stanza))
|
||||||
: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)
|
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user