From cfe11844f2898b8eae17b8cb68e1a4a65817c50c Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@robotics.uk.to>
Date: Sat, 12 Jan 2019 21:54:44 +0000
Subject: [PATCH] Set the xmpp upload max limit to the same size as Signal

---
 src/freedombone-app-xmpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/freedombone-app-xmpp b/src/freedombone-app-xmpp
index a5beb1f4d..1b396d742 100755
--- a/src/freedombone-app-xmpp
+++ b/src/freedombone-app-xmpp
@@ -725,6 +725,11 @@ function upgrade_xmpp {
         xmpp_restart=1
     fi
 
+    if grep -q 'http_upload_file_size_limit = 307200' /etc/prosody/prosody.cfg.lua; then
+        sed -i 's|http_upload_file_size_limit =.*|http_upload_file_size_limi t= 25165824|g' /etc/prosody/prosody.cfg.lua
+        xmpp_restart=1
+    fi
+
     # extra battery saving
     prosody_add_module "csi_compat"
     prosody_add_module "csi_battery_saver"
@@ -1280,7 +1285,7 @@ function xmpp_create_config {
       echo '';
       echo 'Include "conf.d/*.cfg.lua"';
       echo 'http_upload_path = "/var/lib/prosody/http_uploads"';
-      echo 'http_upload_file_size_limit = 307200';
+      echo 'http_upload_file_size_limit = 25165824';
       echo '';
       echo "Component \"chat.${DEFAULT_DOMAIN_NAME}\" \"muc\"";
       echo '    name = "Chatrooms"';
-- 
GitLab