aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-11-15 13:19:04 +0100
committeriNPUTmice <daniel@gultsch.de>2014-11-15 13:19:04 +0100
commit995d1cbf61c2d7bf91afcaff1a0c4ff6a51b1de2 (patch)
tree3079482504595de9e69b25229bcac400c69ef6b4
parent75ed05c0619d102ee0ab5218b982fad0e6d91d7c (diff)
fixed resending for files as well
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java6
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java1
2 files changed, 4 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 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);