mod_bidi: Make compatible Prosody after rev b36765ab0ae3 (fixes #1450)
authorKim Alvefur <zash@zash.se>
Sun, 20 Oct 2019 01:29:25 +0200
changeset 3724 8e7d400d4db3
parent 3723 a6db99c1420a
child 3725 c96a53bf67b3
mod_bidi: Make compatible Prosody after rev b36765ab0ae3 (fixes #1450) Prosody now natively supports bidi, but relies on these .incoming and .outgoing fields existing.
mod_bidi/mod_bidi.lua
--- a/mod_bidi/mod_bidi.lua	Sun Oct 13 23:09:32 2019 +0200
+++ b/mod_bidi/mod_bidi.lua	Sun Oct 20 01:29:25 2019 +0200
@@ -36,9 +36,11 @@
 		end
 		bidi_sessions[origin.from_host] = origin;
 		origin.is_bidi = true;
+		origin.outgoing = true;
 	elseif origin.type == "s2sout" then -- handle incoming stanzas correctly
 		local bidi_session = {
 			type = "s2sin"; direction = "incoming";
+			incoming = true;
 			is_bidi = true; orig_session = origin;
 			to_host = origin.from_host;
 			from_host = origin.to_host;