comparison mod_s2soutinjection/mod_s2soutinjection.lua @ 4557:864fefec1c07

mod_s2soutinjection: Set version 1.0 for outgoing streams (thanks moparisthebest)
author Matthew Wild <mwild1@gmail.com>
date Tue, 11 May 2021 15:54:28 +0100
parents 4057f176be7b
children f4a9e804c457
comparison
equal deleted inserted replaced
4556:c149edb37349 4557:864fefec1c07
14 local from_host, to_host, stanza = event.from_host, event.to_host, event.stanza; 14 local from_host, to_host, stanza = event.from_host, event.to_host, event.stanza;
15 local inject = injected and injected[to_host]; 15 local inject = injected and injected[to_host];
16 if not inject then return end 16 if not inject then return end
17 log("debug", "opening a new outgoing connection for this stanza"); 17 log("debug", "opening a new outgoing connection for this stanza");
18 local host_session = new_outgoing(from_host, to_host); 18 local host_session = new_outgoing(from_host, to_host);
19 host_session.version = 1;
19 20
20 -- Store in buffer 21 -- Store in buffer
21 host_session.bounce_sendq = bounce_sendq; 22 host_session.bounce_sendq = bounce_sendq;
22 host_session.sendq = { {tostring(stanza), stanza.attr.type ~= "error" and stanza.attr.type ~= "result" and st.reply(stanza)} }; 23 host_session.sendq = { {tostring(stanza), stanza.attr.type ~= "error" and stanza.attr.type ~= "result" and st.reply(stanza)} };
23 log("debug", "stanza [%s] queued until connection complete", tostring(stanza.name)); 24 log("debug", "stanza [%s] queued until connection complete", tostring(stanza.name));