filter otr messages from mam queries
This commit is contained in:
parent
bf43f5ddfd
commit
948fd85a43
|
@ -214,6 +214,10 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
|
||||||
finishedMessage.setFingerprint(otrService.getFingerprint(otrSession.getRemotePublicKey()));
|
finishedMessage.setFingerprint(otrService.getFingerprint(otrSession.getRemotePublicKey()));
|
||||||
conversation.setLastReceivedOtrMessageId(null);
|
conversation.setLastReceivedOtrMessageId(null);
|
||||||
|
|
||||||
|
if (body.startsWith("?OTR")) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return finishedMessage;
|
return finishedMessage;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
conversation.resetOtrSession();
|
conversation.resetOtrSession();
|
||||||
|
@ -671,7 +675,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": ignoring OTR message from " + from + " isForwarded=" + Boolean.toString(isForwarded) + ", isProperlyAddressed=" + Boolean.valueOf(isProperlyAddressed));
|
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": ignoring OTR message from " + from + " isForwarded=" + Boolean.toString(isForwarded) + ", isProperlyAddressed=" + Boolean.valueOf(isProperlyAddressed));
|
||||||
message = null;
|
return;
|
||||||
}
|
}
|
||||||
} else if (pgpEncrypted != null && Config.supportOpenPgp()) {
|
} else if (pgpEncrypted != null && Config.supportOpenPgp()) {
|
||||||
message = new Message(conversation, pgpEncrypted, Message.ENCRYPTION_PGP, status);
|
message = new Message(conversation, pgpEncrypted, Message.ENCRYPTION_PGP, status);
|
||||||
|
|
Loading…
Reference in a new issue