From f5ecb4bce0112c099f3ed04d1de4ad94fdbe88fa Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Wed, 20 Nov 2024 00:06:31 -0500 Subject: [PATCH] Context for reaction notifications (cherry picked from commit d337d19533bfaac246ab282d2eb51de071e63027) --- .../eu/siacs/conversations/services/NotificationService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java index 5cf142207..86922c7ab 100644 --- a/src/main/java/eu/siacs/conversations/services/NotificationService.java +++ b/src/main/java/eu/siacs/conversations/services/NotificationService.java @@ -535,7 +535,9 @@ public class NotificationService { if (newReactions.isEmpty()) return; final var message = reactingTo.reply(); - message.appendBody(String.join(" ", newReactions)); + final var quoteable = reactingTo.getQuoteableBody(); + final var parentTxt = reactingTo.isOOb() ? "media" : "'" + (quoteable.length() > 35 ? quoteable.substring(0, 35) + "…" : quoteable) + "'"; + message.appendBody(String.join(" ", newReactions) + " to " + parentTxt); message.setCounterpart(counterpart); message.setOccupantId(occupantId); message.setStatus(Message.STATUS_RECEIVED);