save changed server id in replaced messages
This commit is contained in:
parent
946d97074f
commit
37bd26c75f
|
@ -531,7 +531,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
|
||||||
}
|
}
|
||||||
|
|
||||||
if (replacementId != null && mXmppConnectionService.allowMessageCorrection()) {
|
if (replacementId != null && mXmppConnectionService.allowMessageCorrection()) {
|
||||||
Message replacedMessage = conversation.findMessageWithRemoteIdAndCounterpart(replacementId,
|
final Message replacedMessage = conversation.findMessageWithRemoteIdAndCounterpart(replacementId,
|
||||||
counterpart,
|
counterpart,
|
||||||
message.getStatus() == Message.STATUS_RECEIVED,
|
message.getStatus() == Message.STATUS_RECEIVED,
|
||||||
message.isCarbon());
|
message.isCarbon());
|
||||||
|
@ -549,6 +549,9 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
|
||||||
replacedMessage.setBody(message.getBody());
|
replacedMessage.setBody(message.getBody());
|
||||||
replacedMessage.setEdited(replacedMessage.getRemoteMsgId());
|
replacedMessage.setEdited(replacedMessage.getRemoteMsgId());
|
||||||
replacedMessage.setRemoteMsgId(remoteMsgId);
|
replacedMessage.setRemoteMsgId(remoteMsgId);
|
||||||
|
if (replacedMessage.getServerMsgId() == null || message.getServerMsgId() != null) {
|
||||||
|
replacedMessage.setServerMsgId(message.getServerMsgId());
|
||||||
|
}
|
||||||
replacedMessage.setEncryption(message.getEncryption());
|
replacedMessage.setEncryption(message.getEncryption());
|
||||||
if (replacedMessage.getStatus() == Message.STATUS_RECEIVED) {
|
if (replacedMessage.getStatus() == Message.STATUS_RECEIVED) {
|
||||||
replacedMessage.markUnread();
|
replacedMessage.markUnread();
|
||||||
|
|
Loading…
Reference in a new issue