# HG changeset patch # User Kim Alvefur # Date 1571497303 -7200 # Node ID c96a53bf67b373d4ca8559e3b845182950a08bd4 # Parent 8e7d400d4db388144df1c59d47ef0264e393fda9 mod_bidi: Recommend switching to native module on Prosody trunk diff -r 8e7d400d4db3 -r c96a53bf67b3 mod_bidi/mod_bidi.lua --- 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;