end otr session when receiving failed otr message warnings
This commit is contained in:
parent
a5027104fd
commit
87bc9d3a31
|
@ -202,7 +202,13 @@ public class MessageParser extends AbstractParser implements
|
||||||
if (packet.getType() == MessagePacket.TYPE_ERROR) {
|
if (packet.getType() == MessagePacket.TYPE_ERROR) {
|
||||||
Jid from = packet.getFrom();
|
Jid from = packet.getFrom();
|
||||||
if (from != null) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue