Change summary
src/main/java/eu/siacs/conversations/entities/Message.java | 10 +++++++
1 file changed, 9 insertions(+), 1 deletion(-)
Detailed changes
@@ -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;
}