From fb540605626e1c7bb1544a518a254e6a820afcb3 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 10 May 2018 12:50:08 +0300 Subject: server: MessageReadEvent --- juick-server/src/main/java/com/juick/server/EmailManager.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'juick-server/src/main/java/com/juick/server/EmailManager.java') diff --git a/juick-server/src/main/java/com/juick/server/EmailManager.java b/juick-server/src/main/java/com/juick/server/EmailManager.java index aaebaac8..66e84358 100644 --- a/juick-server/src/main/java/com/juick/server/EmailManager.java +++ b/juick-server/src/main/java/com/juick/server/EmailManager.java @@ -45,6 +45,9 @@ public class EmailManager implements ApplicationListener { public void onApplicationEvent(@Nonnull MessageEvent event) { Message msg = event.getMessage(); List subscribedUsers = event.getUsers(); + if (msg.isService()) { + return; + } if (MessageUtils.isPM(msg)) { String subject = String.format("Private message from %s", msg.getUser().getName()); emailService.getEmails(msg.getTo().getUid(), true).forEach(email -> { -- cgit v1.2.3