From c64e0925f4027d91b53c4aa09bd6b1688984dd73 Mon Sep 17 00:00:00 2001 From: kosyak Date: Fri, 6 Sep 2024 01:02:52 +0200 Subject: [PATCH] fallback on message uuid to fix missed reply id for single mode conversations --- src/main/java/eu/siacs/conversations/entities/Message.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java index ba7dc1bdb..4150d20ac 100644 --- a/src/main/java/eu/siacs/conversations/entities/Message.java +++ b/src/main/java/eu/siacs/conversations/entities/Message.java @@ -352,7 +352,10 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable } public String replyId() { - return conversation.getMode() == Conversation.MODE_MULTI || getRemoteMsgId() == null ? getServerMsgId() : getRemoteMsgId(); + if (conversation.getMode() == Conversation.MODE_MULTI) return getServerMsgId(); + final String remote = getRemoteMsgId(); + if (remote == null && getStatus() > STATUS_RECEIVED) return getUuid(); + return remote; } public Message reply() {