diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-07-21 11:52:49 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-07-21 12:00:01 +0200 |
commit | af76ad01444cc485fcaa67be534278008675c9bb (patch) | |
tree | 621e56ae1e878067146e9406706844394f593263 | |
parent | 394486b300a62f00dd63a6e7afc18b929e2c26f4 (diff) |
end otr session when receiving failed otr message warnings
-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 97bacd8c..94073f8a 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -177,7 +177,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; } |