fixed resending for files as well

This commit is contained in:
iNPUTmice 2014-11-15 13:19:04 +01:00
parent cc4f3702a8
commit e0f012dba1
2 changed files with 4 additions and 3 deletions

View file

@ -714,7 +714,7 @@ public class XmppConnectionService extends Service {
if (message.getType() == Message.TYPE_TEXT) { if (message.getType() == Message.TYPE_TEXT) {
packet = mMessageGenerator.generateOtrChat(message, packet = mMessageGenerator.generateOtrChat(message,
true); true);
} else if (message.getType() == Message.TYPE_IMAGE) { } else if (message.getType() == Message.TYPE_IMAGE || message.getType() == Message.TYPE_FILE) {
mJingleConnectionManager.createNewConnection(message); mJingleConnectionManager.createNewConnection(message);
} }
} }
@ -726,7 +726,7 @@ public class XmppConnectionService extends Service {
|| (message.getEncryption() == Message.ENCRYPTION_PGP)) { || (message.getEncryption() == Message.ENCRYPTION_PGP)) {
packet = mMessageGenerator.generatePgpChat(message, true); 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(); Contact contact = message.getConversation().getContact();
Presences presences = contact.getPresences(); Presences presences = contact.getPresences();
if ((message.getCounterpart() != null) if ((message.getCounterpart() != null)
@ -1457,7 +1457,7 @@ public class XmppConnectionService extends Service {
databaseBackend.updateMessage(msg); databaseBackend.updateMessage(msg);
sendMessagePacket(account, outPacket); 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); mJingleConnectionManager.createNewConnection(msg);
} }
} }

View file

@ -740,6 +740,7 @@ public class JingleConnection implements Downloadable {
} else { } else {
this.mXmppConnectionService.markMessage(this.message, this.mXmppConnectionService.markMessage(this.message,
Message.STATUS_SEND_FAILED); Message.STATUS_SEND_FAILED);
this.message.setDownloadable(null);
} }
} }
this.mJingleConnectionManager.finishConnection(this); this.mJingleConnectionManager.finishConnection(this);