aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main')
-rw-r--r--juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java b/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java
index 8bf0cebc..7412705e 100644
--- a/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java
+++ b/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java
@@ -18,6 +18,7 @@
package com.juick.service;
import com.juick.*;
+import com.juick.model.AnonymousUser;
import com.juick.model.PrivacyOpts;
import com.juick.model.ResponseReply;
import com.juick.server.util.HttpNotFoundException;
@@ -70,7 +71,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ
msg.setReplyto(rs.getInt(3));
User user = new User();
user.setUid(rs.getInt(4));
- user.setName(rs.getString(5));
+ user.setName(Optional.ofNullable(rs.getString(5)).orElse(AnonymousUser.INSTANCE.getName()));
user.setBanned(rs.getBoolean(6));
user.setUri(URI.create(Optional.ofNullable(rs.getString(22)).orElse(StringUtils.EMPTY)));
msg.setUser(user);