Diff

plugins/mod_c2s.lua @ 12808:12bd40b8e105

mod_c2s,mod_s2s: Adapt to XEP-xxxx: Stream Limits Advertisement Thanks MattJ
author Kim Alvefur <zash@zash.se>
date Thu, 20 Oct 2022 14:04:56 +0200
parent 12804:3eef052c72d8
child 12907:d2333b468d07
line wrap: on
line diff
--- a/plugins/mod_c2s.lua	Tue Mar 16 18:30:54 2021 +0100
+++ b/plugins/mod_c2s.lua	Thu Oct 20 14:04:56 2022 +0200
@@ -132,7 +132,8 @@
 	if features.tags[1] or session.full_jid 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) });
+			features:tag("limits", { xmlns = "urn:xmpp:stream-limits:0" })
+				:text_tag("max-size", string.format("%d", stanza_size_limit)):up();
 		end
 		send(features);
 	else