aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_c2s.lua2
-rw-r--r--plugins/mod_s2s.lua8
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index 871875e9..9af21759 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -133,7 +133,7 @@ function stream_callbacks._streamopened(session, attr)
if stanza_size_limit then
features:reset();
features:tag("limits", { xmlns = "urn:xmpp:stream-limits:0" })
- :text_tag("max-size", string.format("%d", stanza_size_limit)):up();
+ :text_tag("max-bytes", string.format("%d", stanza_size_limit)):up();
end
send(features);
else
diff --git a/plugins/mod_s2s.lua b/plugins/mod_s2s.lua
index 484c01eb..eaa9c35a 100644
--- a/plugins/mod_s2s.lua
+++ b/plugins/mod_s2s.lua
@@ -250,14 +250,14 @@ function module.add_host(module)
module:hook("s2sout-stream-features", function (event)
if stanza_size_limit then
event.features:tag("limits", { xmlns = "urn:xmpp:stream-limits:0" })
- :text_tag("max-size", string.format("%d", stanza_size_limit)):up();
+ :text_tag("max-bytes", string.format("%d", stanza_size_limit)):up();
end
end);
module:hook_tag("urn:xmpp:bidi", "bidi", function(session, stanza)
-- Advertising features on bidi connections where no <stream:features> is sent in the other direction
local limits = stanza:get_child("limits", "urn:xmpp:stream-limits:0");
if limits then
- session.outgoing_stanza_size_limit = tonumber(limits:get_child_text("max-size"));
+ session.outgoing_stanza_size_limit = tonumber(limits:get_child_text("max-bytes"));
end
end, 100);
module:hook("s2s-authenticated", make_authenticated, -1);
@@ -265,7 +265,7 @@ function module.add_host(module)
module:hook_stanza("http://etherx.jabber.org/streams", "features", function (session, stanza) -- luacheck: ignore 212/stanza
local limits = stanza:get_child("limits", "urn:xmpp:stream-limits:0");
if limits then
- session.outgoing_stanza_size_limit = tonumber(limits:get_child_text("max-size"));
+ session.outgoing_stanza_size_limit = tonumber(limits:get_child_text("max-bytes"));
end
if session.type == "s2sout" then
-- Stream is authenticated and we are seem to be done with feature negotiation,
@@ -538,7 +538,7 @@ function stream_callbacks._streamopened(session, attr)
if stanza_size_limit then
features:reset();
features:tag("limits", { xmlns = "urn:xmpp:stream-limits:0" })
- :text_tag("max-size", string.format("%d", stanza_size_limit)):up();
+ :text_tag("max-bytes", string.format("%d", stanza_size_limit)):up();
end
log("debug", "Sending stream features: %s", features);