Changeset

12809:71bd009a9789

mod_s2s_bidi: Add provisions for advertising features to bidi peers As introduced in XEP-xxxx: Stream Limits Advertisement
author Kim Alvefur <zash@zash.se>
date Thu, 20 Oct 2022 14:12:56 +0200
parents 12808:12bd40b8e105
children 12810:871d2c95b403
files plugins/mod_s2s_bidi.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_s2s_bidi.lua	Thu Oct 20 14:04:56 2022 +0200
+++ b/plugins/mod_s2s_bidi.lua	Thu Oct 20 14:12:56 2022 +0200
@@ -25,7 +25,9 @@
 		if bidi then
 			session.incoming = true;
 			session.log("debug", "Requesting bidirectional stream");
-			session.sends2s(st.stanza("bidi", { xmlns = xmlns_bidi }));
+			local request_bidi = st.stanza("bidi", { xmlns = xmlns_bidi });
+			module:fire_event("s2sout-stream-features", { origin = session, features = request_bidi });
+			session.sends2s(request_bidi);
 		end
 	end
 end, 200);