aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src')
-rw-r--r--juick-server/src/main/java/com/juick/server/TelegramBotManager.java8
1 files changed, 4 insertions, 4 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 31496407..bf7c9f39 100644
--- a/juick-server/src/main/java/com/juick/server/TelegramBotManager.java
+++ b/juick-server/src/main/java/com/juick/server/TelegramBotManager.java
@@ -329,7 +329,7 @@ public class TelegramBotManager implements NotificationListener {
String msgUrl = formatUrl(jmsg);
if (MessageUtils.isPM(jmsg)) {
telegramService.getTelegramIdentifiers(Collections.singletonList(jmsg.getTo()))
- .forEach(c -> telegramNotify(c, formatPost(jmsg, true), null));
+ .forEach(c -> telegramNotify(c, formatPost(jmsg, true), jmsg));
} else if (MessageUtils.isReply(jmsg)) {
com.juick.Message op = messagesService.getMessage(jmsg.getMid());
String fmsg = String.format("[%s](%s) %s", MSG_LINK, msgUrl, formatPost(jmsg, true));
@@ -356,10 +356,10 @@ public class TelegramBotManager implements NotificationListener {
logger.info("Like received in tg listener");
telegramService.getTelegramIdentifiers(Collections.singletonList(message.getUser()))
.forEach(c -> telegramNotify(c, String.format("%s recommends your [post](%s)",
- MessageUtils.getMarkdownUser(liker), formatUrl(message)),null));
+ MessageUtils.getMarkdownUser(liker), formatUrl(message)), new com.juick.Message()));
telegramService.getTelegramIdentifiers(subscribers)
.forEach(c -> telegramNotify(c, String.format("%s recommends you someone's [post](%s)",
- MessageUtils.getMarkdownUser(liker), formatUrl(message)), null));
+ MessageUtils.getMarkdownUser(liker), formatUrl(message)), new com.juick.Message()));
}
@Override
@@ -373,6 +373,6 @@ public class TelegramBotManager implements NotificationListener {
User target = subscribeEvent.getToUser();
telegramService.getTelegramIdentifiers(Collections.singletonList(target))
.forEach(c -> telegramNotify(c, String.format("%s subscribed to your blog",
- MessageUtils.getMarkdownUser(subscriber)), null));
+ MessageUtils.getMarkdownUser(subscriber)), new com.juick.Message()));
}
}