aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/parser
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-02-17 16:51:36 +0100
committerDaniel Gultsch <daniel@gultsch.de>2016-02-17 16:51:36 +0100
commit59978e157ccbf4717a15238ddb0b0d0d422d7e3f (patch)
tree1d01b8da5f741afd2c69fbb8fef259257af5d05f /src/main/java/eu/siacs/conversations/parser
parent3626e4b3a0d3d3da4be1bdf7645045d8cf892b50 (diff)
only offer message correction for the very last message
Diffstat (limited to 'src/main/java/eu/siacs/conversations/parser')
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
index 69b0e828..c4b63d61 100644
--- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
@@ -336,6 +336,7 @@ public class MessageParser extends AbstractParser implements
if (isTypeGroupChat) {
if (counterpart.getResourcepart().equals(conversation.getMucOptions().getActualNick())) {
status = Message.STATUS_SEND_RECEIVED;
+ isCarbon = true; //not really carbon but received from another resource
if (mXmppConnectionService.markMessage(conversation, remoteMsgId, status)) {
return;
} else if (remoteMsgId == null || Config.IGNORE_ID_REWRITE_IN_MUC) {
@@ -395,7 +396,10 @@ public class MessageParser extends AbstractParser implements
}
if (replacementId != null && mXmppConnectionService.allowMessageCorrection()) {
- Message replacedMessage = conversation.findMessageWithRemoteIdAndCounterpart(replacementId, counterpart);
+ Message replacedMessage = conversation.findMessageWithRemoteIdAndCounterpart(replacementId,
+ counterpart,
+ message.getStatus() == Message.STATUS_RECEIVED,
+ message.isCarbon());
if (replacedMessage != null) {
final boolean fingerprintsMatch = replacedMessage.getAxolotlFingerprint() == null
|| replacedMessage.getAxolotlFingerprint().equals(message.getAxolotlFingerprint());