|
@@ -7,6 +7,9 @@ end
|
7
|
7
|
|
8
|
8
|
local unlimited_jids = module:get_option_inherited_set("unlimited_jids", {});
|
9
|
9
|
|
|
10
|
+-- rises the limit of the stanza size for the unlimited jids, default is 10MB
|
|
11
|
+local unlimited_stanza_size_limit = module:get_option_number("unlimited_size", 10*1024*1024);
|
|
12
|
+
|
10
|
13
|
if unlimited_jids:empty() then
|
11
|
14
|
return;
|
12
|
15
|
end
|
|
@@ -20,5 +23,10 @@ module:hook("authentication-success", function (event)
|
20
|
23
|
elseif session.throttle then
|
21
|
24
|
session.throttle = nil;
|
22
|
25
|
end
|
|
26
|
+
|
|
27
|
+ if unlimited_stanza_size_limit then
|
|
28
|
+ module:log('info', 'Setting stanza size limits for %s to %s', jid, unlimited_stanza_size_limit)
|
|
29
|
+ session.stream:set_stanza_size_limit(unlimited_stanza_size_limit);
|
|
30
|
+ end
|
23
|
31
|
end
|
24
|
32
|
end);
|