diff options
author | Vitaly Takmazov | 2018-04-05 14:19:30 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-04-05 14:19:30 +0300 |
commit | f38e6549c8969aa8a160e93d4ca0e2fce53b6869 (patch) | |
tree | 3524ed28692156864e0497c0fec29dd0101d55b8 /juick-server/src/main/java/com/juick | |
parent | 534d3c6f8ab31c0d41e6a6980f8cbc3f25e8d1b9 (diff) |
server: recommendations in telegram
Diffstat (limited to 'juick-server/src/main/java/com/juick')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/TelegramBotManager.java | 4 |
1 files changed, 4 insertions, 0 deletions
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 |