aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/util
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-10-08 15:37:48 +0300
committerGravatar Vitaly Takmazov2018-11-29 12:07:00 +0300
commit7647ea6728e9203787dff4f640acb4d6ce3a704f (patch)
tree3afe9a6cb1f1cc16c6fea79c798567ed911bb8cd /src/main/java/com/juick/util
parent55cf2dd357088d7bbe0efff6a483679301ab2c22 (diff)
save ActivityPub likes
Diffstat (limited to 'src/main/java/com/juick/util')
-rw-r--r--src/main/java/com/juick/util/MessageUtils.java6
1 files changed, 5 insertions, 1 deletions
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