equal
deleted
inserted
replaced
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, stream = attr }); |
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 if stanza_size_limit then |
|
134 features:reset(); |
|
135 features:tag("stanza-size-limit", { xmlns = "xmpp:prosody.im/stream/limits", bytes = string.format("%d", stanza_size_limit) }); |
|
136 end |
133 send(features); |
137 send(features); |
134 else |
138 else |
135 if session.secure then |
139 if session.secure then |
136 -- Here SASL should be offered |
140 -- Here SASL should be offered |
137 (session.log or log)("warn", "No stream features to offer on secure session. Check authentication settings."); |
141 (session.log or log)("warn", "No stream features to offer on secure session. Check authentication settings."); |