improved compatibility with muc components that change the message id

Daniel Gultsch created

Change summary

src/main/java/eu/siacs/conversations/parser/MessageParser.java | 5 ++-
1 file changed, 3 insertions(+), 2 deletions(-)

Detailed changes

src/main/java/eu/siacs/conversations/parser/MessageParser.java 🔗

@@ -269,9 +269,10 @@ public class MessageParser extends AbstractParser implements
 					status = Message.STATUS_SEND;
 					if (mXmppConnectionService.markMessage(conversation, remoteMsgId, Message.STATUS_SEND_RECEIVED)) {
 						return;
-					} else if (remoteMsgId == null) {
-						Message message = conversation.findSentMessageWithBody(packet.getBody());
+					} else {
+						Message message = conversation.findSentMessageWithBody(body);
 						if (message != null) {
+							message.setRemoteMsgId(remoteMsgId);
 							mXmppConnectionService.markMessage(message, Message.STATUS_SEND_RECEIVED);
 							return;
 						}