Changeset

4673:eee7ef8eb0a2

mod_invites_register: advertise new stream feature from XEP-0445 Continue to advertise the older one for backwards-compatibility.
author Matthew Wild <mwild1@gmail.com>
date Thu, 09 Sep 2021 14:39:13 +0100
parents 4672:0b084f63fed0
children 4674:1b701f208b1b
files mod_invites_register/mod_invites_register.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_invites_register/mod_invites_register.lua	Wed Sep 08 19:28:42 2021 +0200
+++ b/mod_invites_register/mod_invites_register.lua	Thu Sep 09 14:39:13 2021 +0100
@@ -12,7 +12,8 @@
 	invites = module:depends("invites");
 end
 
-local invite_stream_feature = st.stanza("register", { xmlns = "urn:xmpp:invite" }):up();
+local legacy_invite_stream_feature = st.stanza("register", { xmlns = "urn:xmpp:invite" }):up();
+local invite_stream_feature = st.stanza("register", { xmlns = "urn:xmpp:ibr-token:0" }):up();
 module:hook("stream-features", function(event)
 	local session, features = event.origin, event.features;
 
@@ -21,6 +22,7 @@
 		return
 	end
 
+	features:add_child(legacy_invite_stream_feature);
 	features:add_child(invite_stream_feature);
 end);