Handle file transmission properly in axolotl

This commit is contained in:
Andreas Straub 2015-07-17 19:44:05 +02:00
parent 43703870e8
commit 2045a71262

View File

@ -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;