equal
deleted
inserted
replaced
109 hosts[session.host].events.fire_event("stream-features", { origin = session, features = features }); |
109 hosts[session.host].events.fire_event("stream-features", { origin = session, features = features }); |
110 if features.tags[1] or session.full_jid then |
110 if features.tags[1] or session.full_jid then |
111 send(features); |
111 send(features); |
112 else |
112 else |
113 if session.secure then |
113 if session.secure then |
114 -- Normally STARTTLS would be offered |
114 -- Here SASL should be offered |
115 (session.log or log)("warn", "No stream features to offer on secure session. Check authentication settings."); |
115 (session.log or log)("warn", "No stream features to offer on secure session. Check authentication settings."); |
116 else |
116 else |
117 -- Here SASL should be offered |
117 -- Normally STARTTLS would be offered |
118 (session.log or log)("warn", "No stream features to offer on insecure session. Check encryption and security settings."); |
118 (session.log or log)("warn", "No stream features to offer on insecure session. Check encryption and security settings."); |
119 end |
119 end |
120 session:close{ condition = "undefined-condition", text = "No stream features to proceed with" }; |
120 session:close{ condition = "undefined-condition", text = "No stream features to proceed with" }; |
121 end |
121 end |
122 end |
122 end |