diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-12-16 22:40:45 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-12-16 22:40:45 +0100 |
commit | b435a6656ced1c395caf6f74ba459409bbdb2b72 (patch) | |
tree | 2b7a61653cca22899b08498ae20d01a42b5c4e3e /src/main | |
parent | fa351734ecf1f3219f8a83603368e36636926951 (diff) |
save changed server id in replaced messages
Diffstat (limited to 'src/main')
-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(); |