Bump Dockerfile to prosody-13.0.6; all 8 patches re-ported against 13.0.6. Re-ported patches (3 changed, 5 applied with offset): - hidden.lib.patch: 13.0 uses module:may() instead of um_is_admin; changed to 'if restrict_public then' (same intent: hide option for everyone) - mod_muc.patch: 13.0 added restrict_pm between register and presence_broadcast; updated hunk 1 context - mod_muc_unique.patch: 13.0 uses 'require "prosody.util.stanza"' (namespaced); updated context - muc.lib, mod_carbons, mod_mam, mod_muc_mam, register.lib: applied with line offsets, no re-port needed Config changes: - Remove mod_posix from modules_enabled (13.0 absorbed signal handling, pidfile, and run_as_root check into core util/startup.lua) - Move pubsub from modules_enabled to Component (13.0 requires pubsub to be loaded as a component, not a module) Test fix: - test_muc_fcm_push_to_offline_member: wait for count=2 captures instead of 1 — mod_vnc_muc_fcm pushes to ALL affiliated members (including sender, because it can't see main-host sessions from the MUC component); the test was racing on which push arrived first Verified: prosodyctl check config passes; compose-harness testsuite green (80 passed, 6 skipped, 0 failed). Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
42 lines
1.4 KiB
Diff
42 lines
1.4 KiB
Diff
--- a/plugins/mod_muc_unique.lua 2026-07-12 17:26:59.381662221 +0200
|
|
+++ b/plugins/mod_muc_unique.lua 2026-07-12 17:26:59.382662250 +0200
|
|
@@ -2,11 +2,35 @@
|
|
local st = require "prosody.util.stanza";
|
|
local unique_name = require "prosody.util.id".medium;
|
|
module:add_feature "http://jabber.org/protocol/muc#unique"
|
|
-module:hook("iq-get/host/http://jabber.org/protocol/muc#unique:unique", function(event)
|
|
+
|
|
+module:log("info", "uniqe activated");
|
|
+
|
|
+local function handle_iq(event)
|
|
local origin, stanza = event.origin, event.stanza;
|
|
+ local uname = unique_name():lower();
|
|
+ local origto = stanza.attr.to or nil;
|
|
+
|
|
+-- module:log("info", "orig to: %s", origto);
|
|
+-- module:log("info", "uname: %s", uname);
|
|
+
|
|
origin.send(st.reply(stanza)
|
|
:tag("unique", {xmlns = "http://jabber.org/protocol/muc#unique"})
|
|
:text(unique_name():lower())
|
|
);
|
|
- return true;
|
|
-end,-1);
|
|
+
|
|
+end;
|
|
+
|
|
+local function handle_iq_tobare(event)
|
|
+ local origin, stanza = event.origin, event.stanza;
|
|
+ local uname = unique_name():lower();
|
|
+ local origto = stanza.attr.to or nil;
|
|
+
|
|
+-- module:log("info", "orig to: %s", origto);
|
|
+-- module:log("info", "uname: %s", uname);
|
|
+
|
|
+ origin.send(st.error_reply(stanza, "cancel", "item-not-found"));
|
|
+
|
|
+end;
|
|
+
|
|
+module:hook("iq-get/bare/http://jabber.org/protocol/muc#unique:unique", handle_iq_tobare, 1);
|
|
+module:hook("iq-get/host/http://jabber.org/protocol/muc#unique:unique", handle_iq, -1);
|