diff options
Diffstat (limited to 'juick-server/src/main/java')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/Messages.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/Messages.java b/juick-server/src/main/java/com/juick/server/api/Messages.java index b4d16937..e100802f 100644 --- a/juick-server/src/main/java/com/juick/server/api/Messages.java +++ b/juick-server/src/main/java/com/juick/server/api/Messages.java @@ -150,7 +150,9 @@ public class Messages { return FORBIDDEN; } else { List<com.juick.Message> replies = messagesService.getReplies(visitor, mid); - applicationEventPublisher.publishEvent(new MessageReadEvent(this, visitor, msg)); + if (!visitor.isAnonymous()) { + applicationEventPublisher.publishEvent(new MessageReadEvent(this, visitor, msg)); + } replies.add(0, msg); return ResponseEntity.ok(replies); } |