fix: Adds a null check in mod_limits_exceptions.

It is failing on prosody 0.11.4 with mod_limits_exception.lua:29: attempt to call method 'set_stanza_size_limit' (a nil value). That prosody misses set_stanza_size_limit.
This commit is contained in:
Дамян Минков 2021-08-10 14:23:45 -05:00
parent 1e0c25d816
commit 29dd0cf726
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ module:hook("authentication-success", function (event)
session.throttle = nil;
end
if unlimited_stanza_size_limit then
if unlimited_stanza_size_limit and session.stream.set_stanza_size_limit then
module:log('info', 'Setting stanza size limits for %s to %s', jid, unlimited_stanza_size_limit)
session.stream:set_stanza_size_limit(unlimited_stanza_size_limit);
end