do not keep files in waiting when file size exceeds http upload limit in groups. fixes #2533

This commit is contained in:
Daniel Gultsch 2017-07-01 19:31:48 +02:00
parent 2b9cdde558
commit 7cf360fabf
1 changed files with 3 additions and 0 deletions

View File

@ -1231,6 +1231,7 @@ public class XmppConnectionService extends Service {
case Message.ENCRYPTION_NONE: case Message.ENCRYPTION_NONE:
if (message.needsUploading()) { if (message.needsUploading()) {
if (account.httpUploadAvailable(fileBackend.getFile(message,false).getSize()) if (account.httpUploadAvailable(fileBackend.getFile(message,false).getSize())
|| conversation.getMode() == Conversation.MODE_MULTI
|| message.fixCounterpart()) { || message.fixCounterpart()) {
this.sendFileMessage(message, delay); this.sendFileMessage(message, delay);
} else { } else {
@ -1244,6 +1245,7 @@ public class XmppConnectionService extends Service {
case Message.ENCRYPTION_DECRYPTED: case Message.ENCRYPTION_DECRYPTED:
if (message.needsUploading()) { if (message.needsUploading()) {
if (account.httpUploadAvailable(fileBackend.getFile(message,false).getSize()) if (account.httpUploadAvailable(fileBackend.getFile(message,false).getSize())
|| conversation.getMode() == Conversation.MODE_MULTI
|| message.fixCounterpart()) { || message.fixCounterpart()) {
this.sendFileMessage(message, delay); this.sendFileMessage(message, delay);
} else { } else {
@ -1281,6 +1283,7 @@ public class XmppConnectionService extends Service {
message.setFingerprint(account.getAxolotlService().getOwnFingerprint()); message.setFingerprint(account.getAxolotlService().getOwnFingerprint());
if (message.needsUploading()) { if (message.needsUploading()) {
if (account.httpUploadAvailable(fileBackend.getFile(message,false).getSize()) if (account.httpUploadAvailable(fileBackend.getFile(message,false).getSize())
|| conversation.getMode() == Conversation.MODE_MULTI
|| message.fixCounterpart()) { || message.fixCounterpart()) {
this.sendFileMessage(message, delay); this.sendFileMessage(message, delay);
} else { } else {