aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/mitchellbosecke
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2021-08-22 07:42:32 +0300
committerGravatar Vitaly Takmazov2021-08-22 07:42:32 +0300
commit18ba4d188e6f044379ec01ba2170fe57e9116c69 (patch)
treef499b99d765b92db0e75be8a8a85da50c72ba181 /src/main/java/com/mitchellbosecke
parent58b1fbbdd610de31a5883813206f9086e241207e (diff)
ActivityPub: add "mention" class to mention links
* This may make Mastodon happy and may stop adding an url preview
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 90e0547f..aea76b2a 100644
--- a/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java
+++ b/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java
@@ -46,7 +46,7 @@ public class FormatMessageFilter implements Filter {
return new SafeString(formattedMessage);
} else {
String toUserString = msg.getTo().getUid() == 0 ? String.format("<a href=\"%s\" data-user-uri=\"1\">@%s</a>",
- msg.getTo().getUri().toASCIIString(), msg.getTo().getName()) : String.format("<a href=\"https://juick.com/%s/\">@%s</a>", msg.getTo().getName(), msg.getTo().getName());
+ msg.getTo().getUri().toASCIIString(), msg.getTo().getName()) : String.format("<a class=\"mention\" href=\"https://juick.com/%s/\">@%s</a>", 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)
: formattedMessage;