# HG changeset patch # User Matthew Wild # Date 1620662607 -3600 # Node ID dd21eb632f52d9c7eabec0f4e8a4378567373ba5 # Parent b21d8c2869733ee61a9c636335d8d507bab05a80 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). diff -r b21d8c286973 -r dd21eb632f52 util/xmppstream.lua --- a/util/xmppstream.lua Mon May 10 17:02:37 2021 +0100 +++ b/util/xmppstream.lua Mon May 10 17:03:27 2021 +0100 @@ -293,6 +293,9 @@ 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