From 38db29c20d0ead231602c72747f4e31674f86852 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Fri, 31 Jul 2020 16:23:40 +1000 Subject: [PATCH] Update file size limit for onion requests --- .../securesms/mms/PushMediaConstraints.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/org/thoughtcrime/securesms/mms/PushMediaConstraints.java b/src/org/thoughtcrime/securesms/mms/PushMediaConstraints.java index a592c3be86..418b591195 100644 --- a/src/org/thoughtcrime/securesms/mms/PushMediaConstraints.java +++ b/src/org/thoughtcrime/securesms/mms/PushMediaConstraints.java @@ -22,26 +22,26 @@ public class PushMediaConstraints extends MediaConstraints { @Override public int getImageMaxSize(Context context) { - return FileServerAPI.Companion.getMaxFileSize(); + return (int) (((double) FileServerAPI.Companion.getMaxFileSize()) / FileServerAPI.Companion.getFileSizeORMultiplier()); } @Override public int getGifMaxSize(Context context) { - return FileServerAPI.Companion.getMaxFileSize(); + return (int) (((double) FileServerAPI.Companion.getMaxFileSize()) / FileServerAPI.Companion.getFileSizeORMultiplier()); } @Override public int getVideoMaxSize(Context context) { - return FileServerAPI.Companion.getMaxFileSize(); + return (int) (((double) FileServerAPI.Companion.getMaxFileSize()) / FileServerAPI.Companion.getFileSizeORMultiplier()); } @Override public int getAudioMaxSize(Context context) { - return FileServerAPI.Companion.getMaxFileSize(); + return (int) (((double) FileServerAPI.Companion.getMaxFileSize()) / FileServerAPI.Companion.getFileSizeORMultiplier()); } @Override public int getDocumentMaxSize(Context context) { - return FileServerAPI.Companion.getMaxFileSize(); + return (int) (((double) FileServerAPI.Companion.getMaxFileSize()) / FileServerAPI.Companion.getFileSizeORMultiplier()); } }