aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-12-16 22:40:45 +0100
committerChristian Schneppe <christian@pix-art.de>2017-12-16 22:40:45 +0100
commitb435a6656ced1c395caf6f74ba459409bbdb2b72 (patch)
tree2b7a61653cca22899b08498ae20d01a42b5c4e3e /src/main/java/de
parentfa351734ecf1f3219f8a83603368e36636926951 (diff)
save changed server id in replaced messages
Diffstat (limited to 'src/main/java/de')
-rw-r--r--src/main/java/de/pixart/messenger/parser/MessageParser.java5
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();