diff options
author | 2018-11-21 10:00:25 +0300 | |
---|---|---|
committer | 2018-11-21 10:00:25 +0300 | |
commit | 366a0192fee0d2bd8fc13bed47e3a3e61ebb5f90 (patch) | |
tree | 3eabf1199934c5a8f98f233c7f86ee4cc212815e /src/main/java/com/juick/server/XMPPConnection.java | |
parent | 48b3585786f463592b67f825394ac62cdeaab787 (diff) |
Mark all messages read when receiving command from XMPP and Telegram
Diffstat (limited to 'src/main/java/com/juick/server/XMPPConnection.java')
-rw-r--r-- | src/main/java/com/juick/server/XMPPConnection.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/com/juick/server/XMPPConnection.java b/src/main/java/com/juick/server/XMPPConnection.java index 44cc4a30..e0e45cf7 100644 --- a/src/main/java/com/juick/server/XMPPConnection.java +++ b/src/main/java/com/juick/server/XMPPConnection.java @@ -620,6 +620,7 @@ public class XMPPConnection implements StanzaListener, NotificationListener { result = incomingMessageJuick(user_from, msg.getFrom(), String.format("@%s %s", msg.getTo().getLocal(), StringUtils.defaultString(msg.getBody())), attachment); } + messagesService.getUnread(user_from).forEach(mid -> messagesService.setRead(user_from, mid)); } catch (Exception e1) { logger.warn("message exception", e1); } |