From 7647ea6728e9203787dff4f640acb4d6ce3a704f Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 8 Oct 2018 15:37:48 +0300 Subject: save ActivityPub likes --- src/main/java/com/juick/util/MessageUtils.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/juick/util') diff --git a/src/main/java/com/juick/util/MessageUtils.java b/src/main/java/com/juick/util/MessageUtils.java index e6cd6306..cc0d7b12 100644 --- a/src/main/java/com/juick/util/MessageUtils.java +++ b/src/main/java/com/juick/util/MessageUtils.java @@ -250,7 +250,11 @@ public class MessageUtils { } public static String getMarkdownUser(final User user) { - return String.format("[%s](https://juick.com/%s/)", user.getName(), user.getName()); + if (user.getUri().toASCIIString().length() > 0) { + return String.format("[%s](%s)", user.getName(), user.getUri()); + } else { + return String.format("[%s](https://juick.com/%s/)", user.getName(), user.getName()); + } } // TODO: check if it is really needed -- cgit v1.2.3