From 5e392a11f885741c03e99c3ffe73e9a5ef34fbf1 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 25 Nov 2024 00:37:30 +0300 Subject: Thread: do not show recipient nick on the first level reply --- .../mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java b/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java index 1ecfd40d..af3a04ad 100644 --- a/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java +++ b/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java @@ -47,7 +47,7 @@ public class FormatMessageFilter implements Filter { String toUserString = msg.getTo().getUid() == 0 ? String.format("@%s", msg.getTo().getUri().toASCIIString(), msg.getTo().getName()) : String.format("@%s", msg.getTo().getName(), msg.getTo().getName()); String formatString = MessageUtils.replyStartsWithQuote(msg) ? "%s,\n%s" : "%s, %s"; - String msgTxt = msg.getRid() > 0 ? String.format(formatString, toUserString, formattedMessage) + String msgTxt = ((msg.getRid() > 0) && msg.getReplyto() > 0) ? String.format(formatString, toUserString, formattedMessage) : formattedMessage; return new SafeString(msgTxt); } -- cgit v1.2.3