From 84f6e27f7e563bcb58815575546c52c944f0cd3e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 12 Jan 2023 10:58:49 +0300 Subject: Telegram: fix delivery to anonymous users --- src/main/java/com/juick/TelegramBotManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/com/juick') diff --git a/src/main/java/com/juick/TelegramBotManager.java b/src/main/java/com/juick/TelegramBotManager.java index b92704a0..9d0b5862 100644 --- a/src/main/java/com/juick/TelegramBotManager.java +++ b/src/main/java/com/juick/TelegramBotManager.java @@ -449,7 +449,7 @@ public class TelegramBotManager implements NotificationListener { users.forEach(c -> telegramNotify(c, msg, jmsg)); // anonymous - chats.stream().filter(u -> userService.getUserByTelegramId(u).isPresent()).forEach(c -> telegramNotify(c, msg, jmsg)); + chats.stream().filter(u -> userService.getUserByTelegramId(u).isEmpty()).forEach(c -> telegramNotify(c, msg, jmsg)); } } -- cgit v1.2.3