diff options
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r-- | src/main/java/com/juick/util/MessageUtils.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/main/java/com/juick/util/MessageUtils.java b/src/main/java/com/juick/util/MessageUtils.java index 5418ae64..fff97f66 100644 --- a/src/main/java/com/juick/util/MessageUtils.java +++ b/src/main/java/com/juick/util/MessageUtils.java @@ -198,8 +198,9 @@ public class MessageUtils { // /12 // <a href="#12">/12</a> - msg = msg.replaceAll(replyNumberRegex, "$1<a href=\"#$2\">/$2</a>$3"); - + if (!compatibleWithDurov) { + msg = msg.replaceAll(replyNumberRegex, "$1<a href=\"#$2\">/$2</a>$3"); + } // @username@mastodon.social // <a href="http://juick.com/mention?username=username@mastodon.social/">@username@mastodon.social</a> @@ -290,10 +291,6 @@ public class MessageUtils { return URLEncoder.encode(s, StandardCharsets.UTF_8).replace("+", "%20") .replace("*", "%2A").replace("%7E", "~"); } - public static String formatMarkdownText(final Message msg) { - return StringUtils.defaultString(msg.getText()) - .replaceAll(replyNumberRegex, String.format("$1[/$2](https://juick.com/m/%d#$2)$3", msg.getMid())); - } public static String attachmentUrl(final Message jmsg) { if (StringUtils.isEmpty(jmsg.getAttachmentType())) { return StringUtils.EMPTY; |