diff options
author | Vitaly Takmazov | 2018-05-30 10:37:29 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-05-30 10:37:29 +0300 |
commit | 485600a958c13707e9a1d4940e254f449ecab8ca (patch) | |
tree | fa42d850896a564f19974c8871b452a40db2bb32 /juick-server/src/main/java/com | |
parent | ccc5f4479302094b9eed1878e0ab5c4d849c57a6 (diff) |
api: do not publish read events from anonymous
Diffstat (limited to 'juick-server/src/main/java/com')
-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); } |