File

mod_compat_bind/mod_compat_bind.lua @ 6253:4d040f506c6c

mod_vcard_muc: deprecated diff --git a/mod_vcard_muc/README.md b/mod_vcard_muc/README.md --- a/mod_vcard_muc/README.md +++ b/mod_vcard_muc/README.md @@ -1,6 +1,7 @@ --- summary: Support for MUC vCards and avatars labels: +- 'Stage-Deprecated' - 'Stage-Stable' ... @@ -21,8 +22,8 @@ modules_enabled = { # Compatibility - ------------------------- ---------- - trunk^[as of 2024-10-22] Works + ------------------------- ---------------------------------------- + 0.13 Room avatar feature included in Prosody 0.12 Works - ------------------------- ---------- + ------------------------- ----------------------------------------
author Menel <menel@snikket.de>
date Mon, 12 May 2025 12:13:25 +0200
parent 2322:73fbfd1e820b
line wrap: on
line source

-- Compatibility with clients that set 'to' on resource bind requests
--
-- http://xmpp.org/rfcs/rfc3920.html#bind
-- http://xmpp.org/rfcs/rfc6120.html#bind-servergen-success

local st = require "util.stanza";

module:hook("iq/host/urn:ietf:params:xml:ns:xmpp-bind:bind", function(event)
	local fixed_stanza = st.clone(event.stanza);
	fixed_stanza.attr.to = nil;
	prosody.core_process_stanza(event.origin, fixed_stanza);
	return true;
end);