diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-07-21 11:52:49 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-07-21 11:52:49 +0200 |
commit | 87bc9d3a31a7f92b13293669c4c5ce2c5a02f6ae (patch) | |
tree | 690bd512ef6581971834fac1c0a7e2101d128b8b /src/main | |
parent | a5027104fdc3e64bf40a5764a2cf2bbd27a4ba99 (diff) |
end otr session when receiving failed otr message warnings
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/eu/siacs/conversations/parser/MessageParser.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index 0d0dce49a..b81a62da6 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -202,7 +202,13 @@ public class MessageParser extends AbstractParser implements if (packet.getType() == MessagePacket.TYPE_ERROR) { Jid from = packet.getFrom(); if (from != null) { - mXmppConnectionService.markMessage(account, from.toBareJid(), packet.getId(), Message.STATUS_SEND_FAILED); + Message message = mXmppConnectionService.markMessage(account, + from.toBareJid(), + packet.getId(), + Message.STATUS_SEND_FAILED); + if (message.getEncryption() == Message.ENCRYPTION_OTR) { + message.getConversation().endOtrIfNeeded(); + } } return true; } |