aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com/juick/api/TelegramBotManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-api/src/main/java/com/juick/api/TelegramBotManager.java')
-rw-r--r--juick-api/src/main/java/com/juick/api/TelegramBotManager.java11
1 files changed, 9 insertions, 2 deletions
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 bdf8bc83..73b8c3a8 100644
--- a/juick-api/src/main/java/com/juick/api/TelegramBotManager.java
+++ b/juick-api/src/main/java/com/juick/api/TelegramBotManager.java
@@ -106,8 +106,15 @@ public class TelegramBotManager implements ApplicationListener<MessageEvent> {
}
}
- public void telegramNotify(Long c, String msg) {
- SendMessage telegramMessage = new SendMessage(c, msg);
+ public void telegramNotify(Long chatId, String msg) {
+ telegramNotify(chatId, msg, 0);
+ }
+
+ public void telegramNotify(Long chatId, String msg, Integer replyTo) {
+ SendMessage telegramMessage = new SendMessage(chatId, msg);
+ if (replyTo > 0) {
+ telegramMessage.replyToMessageId(replyTo);
+ }
telegramMessage.parseMode(ParseMode.Markdown).disableWebPagePreview(true);
bot.execute(telegramMessage, new Callback<SendMessage, SendResponse>() {
@Override