fix for not being able to send otr encrypted images to offline contacts. unconfirmed
This commit is contained in:
parent
43e276e325
commit
d7656dd420
|
@ -760,13 +760,7 @@ public class XmppConnectionService extends Service {
|
|||
|
||||
private void resendMessage(Message message) {
|
||||
Account account = message.getConversation().getAccount();
|
||||
if (message.getType() == Message.TYPE_TEXT) {
|
||||
MessagePacket packet = null;
|
||||
if (message.getEncryption() == Message.ENCRYPTION_NONE) {
|
||||
packet = mMessageGenerator.generateChat(message,true);
|
||||
} else if ((message.getEncryption() == Message.ENCRYPTION_DECRYPTED)||(message.getEncryption() == Message.ENCRYPTION_PGP)) {
|
||||
packet = mMessageGenerator.generatePgpChat(message,true);
|
||||
} else if (message.getEncryption() == Message.ENCRYPTION_OTR) {
|
||||
if (message.getEncryption() == Message.ENCRYPTION_OTR) {
|
||||
Presences presences = message.getConversation().getContact()
|
||||
.getPresences();
|
||||
if (!message.getConversation().hasValidOtrSession()) {
|
||||
|
@ -783,6 +777,12 @@ public class XmppConnectionService extends Service {
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if (message.getType() == Message.TYPE_TEXT) {
|
||||
MessagePacket packet = null;
|
||||
if (message.getEncryption() == Message.ENCRYPTION_NONE) {
|
||||
packet = mMessageGenerator.generateChat(message,true);
|
||||
} else if ((message.getEncryption() == Message.ENCRYPTION_DECRYPTED)||(message.getEncryption() == Message.ENCRYPTION_PGP)) {
|
||||
packet = mMessageGenerator.generatePgpChat(message,true);
|
||||
}
|
||||
if (packet != null) {
|
||||
account.getXmppConnection().sendMessagePacket(packet);
|
||||
|
|
Loading…
Reference in New Issue