aboutsummaryrefslogtreecommitdiffstats
path: root/util/xmppstream.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2021-05-10 17:03:27 +0100
committerMatthew Wild <mwild1@gmail.com>2021-05-10 17:03:27 +0100
commit92cec56e9760c6dc2dc3d775e81646e9995fc6b4 (patch)
tree00c112386da8569dba723c23b0d6a1c947740afc /util/xmppstream.lua
parent7cb3ec61d5117fa1be7077ea9efaef4d4e52ca57 (diff)
downloadprosody-92cec56e9760c6dc2dc3d775e81646e9995fc6b4.tar.gz
prosody-92cec56e9760c6dc2dc3d775e81646e9995fc6b4.zip
util.xmppstream: Allow dynamically configuring the stanza size limit for a stream
This may be useful for any plugins that want to experiment with different policies for stanza size limits (e.g. unauthenticated vs authenticated streams).
Diffstat (limited to 'util/xmppstream.lua')
-rw-r--r--util/xmppstream.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/xmppstream.lua b/util/xmppstream.lua
index 57e1def3..82a9820f 100644
--- a/util/xmppstream.lua
+++ b/util/xmppstream.lua
@@ -293,6 +293,9 @@ local function new(session, stream_callbacks, stanza_size_limit)
return ok, err;
end,
set_session = meta.set_session;
+ set_stanza_size_limit = function (_, new_stanza_size_limit)
+ stanza_size_limit = new_stanza_size_limit;
+ end;
};
end