From 770c9fa78f84579ff1f791c0e03a4654755dae68 Mon Sep 17 00:00:00 2001 From: kpa39l Date: Sat, 29 Aug 2026 17:55:16 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20mod=5Fprivilege=20=D0=BD=D0=B0=20Prosody?= =?UTF-8?q?=200.11=20=E2=80=94=20=D1=81=D1=82=D0=B0=D0=B1-ACK=20=D0=B2?= =?UTF-8?q?=D0=BC=D0=B5=D1=81=D1=82=D0=BE=20module:send=5Fiq=20(0.12=20API?= =?UTF-8?q?);=20=D0=BA=D0=BE=D0=BD=D1=82=D0=B0=D0=BA=D1=82=D1=8B=20TG=20?= =?UTF-8?q?=D1=86=D0=B5=D0=BB=D1=8B=20=D0=B2=20=D1=80=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=20(1602)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/mod_privilege.lua | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) 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)