aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreerielili <lionel@les-miquelots.net>2023-11-24 21:13:57 +0000
committerGitHub <noreply@github.com>2023-11-24 22:13:57 +0100
commit85ea7e50083be4be11a675c83835e2f1f957d0dc (patch)
treed4586e215bbf482bf5a447816e15832366f4f131
parentcb78cec9e2aaeae459031c2885843ada050ba752 (diff)
downloaddino-85ea7e50083be4be11a675c83835e2f1f957d0dc.tar.gz
dino-85ea7e50083be4be11a675c83835e2f1f957d0dc.zip
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
-rw-r--r--xmpp-vala/src/module/xep/0363_http_file_upload.vala4
1 files changed, 3 insertions, 1 deletions
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;
}
}