From e0f012dba1e8eba3a2d721d685d67ac7901e5c84 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Sat, 15 Nov 2014 13:19:04 +0100 Subject: fixed resending for files as well --- .../java/eu/siacs/conversations/services/XmppConnectionService.java | 6 +++--- .../java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main') diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 06137c64..0383d6ea 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -714,7 +714,7 @@ public class XmppConnectionService extends Service { if (message.getType() == Message.TYPE_TEXT) { packet = mMessageGenerator.generateOtrChat(message, true); - } else if (message.getType() == Message.TYPE_IMAGE) { + } else if (message.getType() == Message.TYPE_IMAGE || message.getType() == Message.TYPE_FILE) { mJingleConnectionManager.createNewConnection(message); } } @@ -726,7 +726,7 @@ public class XmppConnectionService extends Service { || (message.getEncryption() == Message.ENCRYPTION_PGP)) { packet = mMessageGenerator.generatePgpChat(message, true); } - } else if (message.getType() == Message.TYPE_IMAGE) { + } else if (message.getType() == Message.TYPE_IMAGE || message.getType() == Message.TYPE_FILE) { Contact contact = message.getConversation().getContact(); Presences presences = contact.getPresences(); if ((message.getCounterpart() != null) @@ -1457,7 +1457,7 @@ public class XmppConnectionService extends Service { databaseBackend.updateMessage(msg); sendMessagePacket(account, outPacket); } - } else if (msg.getType() == Message.TYPE_IMAGE) { + } else if (msg.getType() == Message.TYPE_IMAGE || msg.getType() == Message.TYPE_FILE) { mJingleConnectionManager.createNewConnection(msg); } } diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java index 0db14503..febd4f57 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java @@ -740,6 +740,7 @@ public class JingleConnection implements Downloadable { } else { this.mXmppConnectionService.markMessage(this.message, Message.STATUS_SEND_FAILED); + this.message.setDownloadable(null); } } this.mJingleConnectionManager.finishConnection(this); -- cgit v1.2.3