work with muc services that change the message id

This commit is contained in:
Daniel Gultsch 2015-10-14 11:15:18 +02:00
parent beca748634
commit 0587ba2ad2
2 changed files with 3 additions and 1 deletions

View File

@ -50,6 +50,8 @@ public final class Config {
public static final boolean X509_VERIFICATION = false; //use x509 certificates to verify OMEMO keys
public static final boolean IGNORE_ID_REWRITE_IN_MUC = true;
public static final long MILLISECONDS_IN_DAY = 24 * 60 * 60 * 1000;
public static final long MAM_MAX_CATCHUP = MILLISECONDS_IN_DAY / 2;
public static final int MAM_MAX_MESSAGES = 500;

View File

@ -315,7 +315,7 @@ public class MessageParser extends AbstractParser implements
status = Message.STATUS_SEND_RECEIVED;
if (mXmppConnectionService.markMessage(conversation, remoteMsgId, status)) {
return;
} else if (remoteMsgId == null) {
} else if (remoteMsgId == null || Config.IGNORE_ID_REWRITE_IN_MUC) {
Message message = conversation.findSentMessageWithBody(packet.getBody());
if (message != null) {
mXmppConnectionService.markMessage(message, status);