diff options
author | 2018-09-25 13:02:14 +0300 | |
---|---|---|
committer | 2018-09-25 13:02:14 +0300 | |
commit | 68789ca6c3972db476a325cd5c1bdc70cd7962f6 (patch) | |
tree | 7429a98fdcc05eaf76b3e8cf625ba3f21288d79d /juick-server/src/main/java/com/juick/server/api | |
parent | 15753b2ebdac2ab49cf5682c417851a0653e136e (diff) |
update juick-server to new events api
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"))); } |