Comparison

plugins/mod_c2s.lua @ 13093:93c68c454cb8

mod_c2s,mod_s2s: Fix tag name for SLA (thanks mjk) The (still not published) XEP-xxxx: Stream Limits Advertisement uses the element <max-bytes/> to advertise the maximum octet size of top level stream elements. "size" was probably a leftover of an even earlier version of the (Proto)XEP.
author Kim Alvefur <zash@zash.se>
date Wed, 03 May 2023 18:02:11 +0200
parent 12977:74b9e05af71e
child 13095:1693bd4de283
comparison
equal deleted inserted replaced
13092:bc46cfe7c037 13093:93c68c454cb8
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 133 if stanza_size_limit then
134 features:reset(); 134 features:reset();
135 features:tag("limits", { xmlns = "urn:xmpp:stream-limits:0" }) 135 features:tag("limits", { xmlns = "urn:xmpp:stream-limits:0" })
136 :text_tag("max-size", string.format("%d", stanza_size_limit)):up(); 136 :text_tag("max-bytes", string.format("%d", stanza_size_limit)):up();
137 end 137 end
138 send(features); 138 send(features);
139 else 139 else
140 if session.secure then 140 if session.secure then
141 -- Here SASL should be offered 141 -- Here SASL should be offered