From f38e6549c8969aa8a160e93d4ca0e2fce53b6869 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 5 Apr 2018 14:19:30 +0300 Subject: server: recommendations in telegram --- juick-server/src/main/java/com/juick/server/TelegramBotManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/juick-server/src/main/java/com/juick/server/TelegramBotManager.java b/juick-server/src/main/java/com/juick/server/TelegramBotManager.java index 54edb5db..2d2fd4ac 100644 --- a/juick-server/src/main/java/com/juick/server/TelegramBotManager.java +++ b/juick-server/src/main/java/com/juick/server/TelegramBotManager.java @@ -332,6 +332,10 @@ public class TelegramBotManager implements NotificationListener { telegramService.getTelegramIdentifiers(Collections.singletonList(message.getUser())) .forEach(c -> telegramNotify(c, String.format("%s recommends your [post](%s)", MessageUtils.getMarkdownUser(liker), formatUrl(message)),null)); + telegramService.getTelegramIdentifiers(subscriptionService.getUsersSubscribedToUserRecommendations( + liker.getUid(), message.getMid(), message.getUser().getUid())) + .forEach(c -> telegramNotify(c, String.format("%s recommends you someone's [post](%s)", + MessageUtils.getMarkdownUser(liker), formatUrl(message)), null)); } @Override -- cgit v1.2.3