diff mod_bidi/mod_bidi.lua @ 3721:c96a53bf67b3

mod_bidi: Recommend switching to native module on Prosody trunk
author Kim Alvefur <zash@zash.se>
date Sat, 19 Oct 2019 17:01:43 +0200
parents 8e7d400d4db3
children
line wrap: on
line diff
--- a/mod_bidi/mod_bidi.lua	Sun Oct 20 01:29:25 2019 +0200
+++ b/mod_bidi/mod_bidi.lua	Sat Oct 19 17:01:43 2019 +0200
@@ -75,6 +75,9 @@
 	and not disable_bidi_for:contains(origin.from_host)
 	and (not secure_only or (origin.cert_chain_status == "valid"
 	and origin.cert_identity_status == "valid")) then
+		if origin.incoming == true then
+			module:log("warn", "This module can now be replaced by mod_s2s_bidi which is included with Prosody");
+		end
 		module:log("debug", "Announcing support for bidirectional streams");
 		features:tag("bidi", { xmlns = xmlns_bidi_feature }):up();
 	end
@@ -100,6 +103,9 @@
 	and event.stanza:get_child("bidi", xmlns_bidi_feature)
 	and (not secure_only or origin.cert_chain_status == "valid"
 	and origin.cert_identity_status == "valid") then
+		if origin.outgoing == true then
+			module:log("warn", "This module can now be replaced by mod_s2s_bidi which is included with Prosody");
+		end
 		module:log("debug", "%s supports bidirectional streams", origin.to_host);
 		origin.sends2s(st.stanza("bidi", { xmlns = xmlns_bidi }));
 		origin.do_bidi = true;