diff options
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/api')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/Messages.java | 6 |
1 files changed, 4 insertions, 2 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 86f9a20d..6baa154b 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 @@ -174,7 +174,8 @@ public class Messages { msg.setRecommendations(new HashSet<>(messagesService.getMessageRecommendations(msg.getMid()))); List<com.juick.Message> replies = messagesService.getReplies(visitor, mid); if (!visitor.isAnonymous()) { - applicationEventPublisher.publishEvent(new MessageReadEvent(this, visitor, msg)); + applicationEventPublisher.publishEvent( + new MessageReadEvent(this, Collections.singletonList(visitor), msg)); } replies.add(0, msg); return ResponseEntity.ok(replies); @@ -188,7 +189,8 @@ public class Messages { if (!visitor.isAnonymous()) { messagesService.setLastReadComment(visitor, mid, rid); Message msg = messagesService.getMessage(mid); - applicationEventPublisher.publishEvent(new MessageReadEvent(this, visitor, msg)); + applicationEventPublisher.publishEvent( + new MessageReadEvent(this, Collections.singletonList(visitor), msg)); return IOUtils.toByteArray( Objects.requireNonNull(getClass().getClassLoader().getResource("Transparent.gif"))); } |