From aa2a16145a084290cae1b4c8934a19abfbd7ac5d Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 23 Oct 2018 21:05:41 +0300 Subject: update last_seen on message read --- juick-server/src/main/java/com/juick/server/api/Messages.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'juick-server/src/main/java/com/juick/server/api') 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 424ea492..4f0009dd 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,6 +174,7 @@ public class Messages { msg.setRecommendations(new HashSet<>(messagesService.getMessageRecommendations(msg.getMid()))); List replies = messagesService.getReplies(visitor, mid); if (!visitor.isAnonymous()) { + userService.updateLastSeen(visitor); applicationEventPublisher.publishEvent( new MessageReadEvent(this, visitor, msg)); } @@ -189,6 +190,7 @@ public class Messages { if (!visitor.isAnonymous()) { messagesService.setLastReadComment(visitor, mid, rid); Message msg = messagesService.getMessage(mid); + userService.updateLastSeen(visitor); applicationEventPublisher.publishEvent( new MessageReadEvent(this, visitor, msg)); return IOUtils.toByteArray( -- cgit v1.2.3