From 92cec56e9760c6dc2dc3d775e81646e9995fc6b4 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 10 May 2021 17:03:27 +0100 Subject: 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). --- util/xmppstream.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'util') 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 -- cgit v1.2.3