aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/services/XmppConnectionService.java')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index 90b2ee17..877806f3 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -692,7 +692,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
if (account.getStatus() == Account.State.ONLINE
&& account.getXmppConnection() != null) {
if (message.needsUploading()) {
- if (message.getCounterpart() != null) {
+ if (message.getCounterpart() != null || account.httpUploadAvailable()) {
if (message.getEncryption() == Message.ENCRYPTION_OTR) {
if (!conv.hasValidOtrSession()) {
conv.startOtrSession(message.getCounterpart().getResourcepart(),true);
@@ -834,8 +834,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
} else if (message.needsUploading()) {
Contact contact = message.getConversation().getContact();
Presences presences = contact.getPresences();
- if ((message.getCounterpart() != null)
- && (presences.has(message.getCounterpart().getResourcepart()))) {
+ if (account.httpUploadAvailable() || (message.getCounterpart() != null && presences.has(message.getCounterpart().getResourcepart()))) {
this.sendFileMessage(message);
} else {
if (presences.size() == 1) {