aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/mitchellbosecke
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2024-11-25 00:37:30 +0300
committerGravatar Vitaly Takmazov2024-11-25 00:37:30 +0300
commit5e392a11f885741c03e99c3ffe73e9a5ef34fbf1 (patch)
tree58dc102417e70fac374c6cc509d1675fec7fdd37 /src/main/java/com/mitchellbosecke
parent70da316e601c31195287f481db296287b59f2401 (diff)
Thread: do not show recipient nick on the first level reply
Diffstat (limited to 'src/main/java/com/mitchellbosecke')
-rw-r--r--src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java2
1 files changed, 1 insertions, 1 deletions
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("<span class=\"h-card\"><a class=\"mention u-url\" href=\"%s\" data-user-uri=\"1\">@%s</a></span>",
msg.getTo().getUri().toASCIIString(), msg.getTo().getName()) : String.format("<span class=\"h-card\"><a class=\"u-url\" href=\"https://juick.com/%s/\">@%s</a></span>", 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);
}