aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs
diff options
context:
space:
mode:
authorAndreas Straub <andy@strb.org>2015-07-17 19:44:05 +0200
committerAndreas Straub <andy@strb.org>2015-07-19 22:23:28 +0200
commit2045a7126242ef7656a38e445b636ae87d4b763e (patch)
treeb5b5427bcc01dc262f52cb3dd3fb451d34ae2a01 /src/main/java/eu/siacs
parent43703870e87bfda94993439f57c7d2692aaf7783 (diff)
Handle file transmission properly in axolotl
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index 60815f5e..08c0b3fa 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -755,10 +755,18 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
}
break;
case Message.ENCRYPTION_AXOLOTL:
- packet = account.getAxolotlService().fetchPacketFromCache(message);
- if (packet == null) {
- account.getAxolotlService().prepareMessage(message);
- message.setAxolotlFingerprint(account.getAxolotlService().getOwnPublicKey().getFingerprint().replaceAll("\\s", ""));
+ if (message.needsUploading()) {
+ if (account.httpUploadAvailable() || message.fixCounterpart()) {
+ this.sendFileMessage(message);
+ } else {
+ break;
+ }
+ } else {
+ packet = account.getAxolotlService().fetchPacketFromCache(message);
+ if (packet == null) {
+ account.getAxolotlService().prepareMessage(message);
+ message.setAxolotlFingerprint(account.getAxolotlService().getOwnPublicKey().getFingerprint().replaceAll("\\s", ""));
+ }
}
break;