aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/util/MessageUtils.java
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/juick/util/MessageUtils.java
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/juick/util/MessageUtils.java')
-rw-r--r--src/main/java/com/juick/util/MessageUtils.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/juick/util/MessageUtils.java b/src/main/java/com/juick/util/MessageUtils.java
index b0093b38..12823498 100644
--- a/src/main/java/com/juick/util/MessageUtils.java
+++ b/src/main/java/com/juick/util/MessageUtils.java
@@ -194,11 +194,11 @@ public class MessageUtils {
// @username@jabber.org
// <a href="http://juick.com/username@jabber.org/">@username@jabber.org</a>
- msg = msg.replaceAll(jidRegex, "$1<a href=\"https://juick.com/$2/\">@$2</a>$3");
+ msg = msg.replaceAll(jidRegex, "$1<a class=\"mention\" href=\"https://juick.com/$2/\">@$2</a>$3");
// @username
// <a href="http://juick.com/username/">@username</a>
- msg = msg.replaceAll(usernameRegex, "$1<a href=\"https://juick.com/$2/\">@$2</a>$3");
+ msg = msg.replaceAll(usernameRegex, "$1<a class=\"mention\" href=\"https://juick.com/$2/\">@$2</a>$3");
// (http://juick.com/last?page=2)
// (<a href="http://juick.com/last?page=2" rel="nofollow">juick.com</a>)