aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-10-05 15:07:32 +0300
committerGravatar Vitaly Takmazov2018-10-05 15:07:32 +0300
commitbcfd8e147387025db75d5ee15168405aad62730e (patch)
treeb2aee890c0cf598ceea458153dcdd6ac982e34eb /juick-server/src/main/java/com/juick
parent10e6ff1418366a9283d40ba8c703aacbe58218c0 (diff)
Anonymous comments
Diffstat (limited to 'juick-server/src/main/java/com/juick')
-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);