Comparison

plugins/mod_c2s.lua @ 12773:f100c1035576

mod_c2s: Include stream attributes in stream-features event We need this to access 'from' in SASL2/FAST.
author Matthew Wild <mwild1@gmail.com>
date Fri, 14 Oct 2022 11:21:16 +0100
parent 12677:3b9771d496ed
child 12804:3eef052c72d8
comparison
equal deleted inserted replaced
12772:daa654dbd8de 12773:f100c1035576
126 (session.log or log)("info", "Stream encrypted"); 126 (session.log or log)("info", "Stream encrypted");
127 end 127 end
128 end 128 end
129 129
130 local features = st.stanza("stream:features"); 130 local features = st.stanza("stream:features");
131 hosts[session.host].events.fire_event("stream-features", { origin = session, features = features }); 131 hosts[session.host].events.fire_event("stream-features", { origin = session, features = features, stream = attr });
132 if features.tags[1] or session.full_jid then 132 if features.tags[1] or session.full_jid then
133 send(features); 133 send(features);
134 else 134 else
135 if session.secure then 135 if session.secure then
136 -- Here SASL should be offered 136 -- Here SASL should be offered