aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2021-09-16 00:51:23 +0300
committerGravatar Vitaly Takmazov2021-09-16 00:51:23 +0300
commita3d45f31b07735118b2e74ddb3cb3af0dc29495c (patch)
treee3013c539e21c6f07b22a6cc7aaa4e272a0c0727 /src/main
parent2dcf645d93e26ad02c276268448eaf0ec43cbd23 (diff)
Add required magic to make Mastodon happy
Diffstat (limited to 'src/main')
-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 1b2f30b5..41c80691 100644
--- a/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java
+++ b/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java
@@ -45,7 +45,7 @@ public class FormatMessageFilter implements Filter {
if (MessageUtils.isPM(msg)) {
return new SafeString(formattedMessage);
} else {
- String toUserString = msg.getTo().getUid() == 0 ? String.format("<a href=\"%s\" data-user-uri=\"1\">@%s</a>",
+ String toUserString = msg.getTo().getUid() == 0 ? String.format("<a class=\"mention\" href=\"%s\" data-user-uri=\"1\">@%s</a>",
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)