diff options
Diffstat (limited to 'juick-api/src')
3 files changed, 3 insertions, 3 deletions
diff --git a/juick-api/src/main/java/com/juick/api/EmailManager.java b/juick-api/src/main/java/com/juick/api/EmailManager.java index 02ad60fd..fa86b406 100644 --- a/juick-api/src/main/java/com/juick/api/EmailManager.java +++ b/juick-api/src/main/java/com/juick/api/EmailManager.java @@ -50,7 +50,7 @@ public class EmailManager implements ApplicationListener<MessageEvent> { subscriptionService.getSubscribedUsers(msg.getUser().getUid(), msg.getMid()) .forEach(user -> emailService.getEmails(user.getUid(), true) .forEach(email -> emailNotify(email, subject, msg))); - } else { + } else if (msg.getRid() > 0) { Message originalMessage = messagesService.getMessage(msg.getMid()); String subject = String.format("New reply to %s", originalMessage.getUser().getName()); subscriptionService.getUsersSubscribedToComments(msg.getMid(), msg.getUser().getUid()) diff --git a/juick-api/src/main/java/com/juick/api/MessengerManager.java b/juick-api/src/main/java/com/juick/api/MessengerManager.java index 75c496c8..7341b946 100644 --- a/juick-api/src/main/java/com/juick/api/MessengerManager.java +++ b/juick-api/src/main/java/com/juick/api/MessengerManager.java @@ -110,7 +110,7 @@ public class MessengerManager implements ApplicationListener<MessageEvent> { subscriptionService.getSubscribedUsers(msg.getUser().getUid(), msg.getMid()) .forEach(user -> messengerService.getSenderId(user) .ifPresent(t -> messengerNotify(t, subject, formatUrl(msg)))); - } else { + } else if (msg.getRid() > 0) { // get quote com.juick.Message jmsg = messagesService.getReply(msg.getMid(), msg.getRid()); String subject = formatPost(jmsg); diff --git a/juick-api/src/main/java/com/juick/api/TelegramBotManager.java b/juick-api/src/main/java/com/juick/api/TelegramBotManager.java index 0273a314..c82436ed 100644 --- a/juick-api/src/main/java/com/juick/api/TelegramBotManager.java +++ b/juick-api/src/main/java/com/juick/api/TelegramBotManager.java @@ -223,7 +223,7 @@ public class TelegramBotManager implements ApplicationListener<MessageEvent> { users.forEach(c -> telegramNotify(c, msg)); // anonymous chats.stream().filter(u -> telegramService.getUser(u) == 0).forEach(c -> telegramNotify(c, msg)); - } else { + } else if (jmsg.getRid() > 0) { // get quote com.juick.Message msg = messagesService.getReply(jmsg.getMid(), jmsg.getRid()); String fmsg = String.format("[%s](%s) %s", MSG_LINK, msgUrl, formatPost(msg, true)); |