diff options
Diffstat (limited to 'src/main/java/de')
-rw-r--r-- | src/main/java/de/pixart/messenger/parser/MessageParser.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/MessageParser.java b/src/main/java/de/pixart/messenger/parser/MessageParser.java index f237ab106..dd97291a1 100644 --- a/src/main/java/de/pixart/messenger/parser/MessageParser.java +++ b/src/main/java/de/pixart/messenger/parser/MessageParser.java @@ -528,7 +528,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece } if (replacementId != null && mXmppConnectionService.allowMessageCorrection()) { - Message replacedMessage = conversation.findMessageWithRemoteIdAndCounterpart(replacementId, + final Message replacedMessage = conversation.findMessageWithRemoteIdAndCounterpart(replacementId, counterpart, message.getStatus() == Message.STATUS_RECEIVED, message.isCarbon()); @@ -546,6 +546,9 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece replacedMessage.setBody(message.getBody()); replacedMessage.setEdited(replacedMessage.getRemoteMsgId()); replacedMessage.setRemoteMsgId(remoteMsgId); + if (replacedMessage.getServerMsgId() == null || message.getServerMsgId() != null) { + replacedMessage.setServerMsgId(message.getServerMsgId()); + } replacedMessage.setEncryption(message.getEncryption()); if (replacedMessage.getStatus() == Message.STATUS_RECEIVED) { replacedMessage.markUnread(); |