Software /
code /
prosody
Changeset
12805:d96e24bd54e1
mod_s2s: Advertise stanza size limit to other servers
So they can, like, not send big stanzas.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 16 Mar 2021 18:25:05 +0100 |
parents | 12804:3eef052c72d8 |
children | 12806:751bdd412915 |
files | plugins/mod_s2s.lua |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_s2s.lua Tue Mar 16 18:17:05 2021 +0100 +++ b/plugins/mod_s2s.lua Tue Mar 16 18:25:05 2021 +0100 @@ -518,6 +518,11 @@ end if ( session.type == "s2sin" or session.type == "s2sout" ) or features.tags[1] then + if stanza_size_limit then + features:reset(); + features:tag("stanza-size-limit", { xmlns = "xmpp:prosody.im/stream/limits", bytes = string.format("%d", stanza_size_limit) }); + end + log("debug", "Sending stream features: %s", features); session.sends2s(features); else