From 74d09d485f2e65c5e8bf4cda5d200b3f834022d0 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Thu, 4 Jul 2024 19:11:06 -0500 Subject: [PATCH] No reacting to a reaction --- .../java/eu/siacs/conversations/entities/Message.java | 10 +++++++++- 1 file changed, 9 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 296728d7a..877f14a92 100644 --- a/src/main/java/eu/siacs/conversations/entities/Message.java +++ b/src/main/java/eu/siacs/conversations/entities/Message.java @@ -446,7 +446,15 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable public Message react(String emoji) { final var m = reply(); - m.updateReaction(this, emoji); + if (getReactions() == null) { + m.updateReaction(this, emoji); + } else if (mInReplyTo != null) { + // Try to send react-to-reaction to parent + m.updateReaction(mInReplyTo, emoji); + } else { + // Do not send react-to-reaction + m.updateReplyTo(this, new SpannableStringBuilder(emoji)); + } return m; } -- 2.45.2