aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/util
diff options
context:
space:
mode:
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