From 85ea7e50083be4be11a675c83835e2f1f957d0dc Mon Sep 17 00:00:00 2001 From: eerielili Date: Fri, 24 Nov 2023 21:13:57 +0000 Subject: Fix http upload for servers without file size limit (#1512) * Fix for ejabberd XMPP server 'infinity' http upload file size announce - fixes https://github.com/dino/dino/issues/1222 * Update 0363_http_file_upload.vala --- xmpp-vala/src/module/xep/0363_http_file_upload.vala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xmpp-vala') diff --git a/xmpp-vala/src/module/xep/0363_http_file_upload.vala b/xmpp-vala/src/module/xep/0363_http_file_upload.vala index 996128e2..c7b8fb59 100644 --- a/xmpp-vala/src/module/xep/0363_http_file_upload.vala +++ b/xmpp-vala/src/module/xep/0363_http_file_upload.vala @@ -181,7 +181,9 @@ public class Module : XmppStreamModule { } } if (max_file_size_str != null) return long.parse(max_file_size_str); - return -1; + + // If there is no max-file-size node, there is no file size limit + return long.MAX; } } -- cgit v1.2.3-70-g09d2