aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com/juick/api/TelegramBotManager.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-11-03 13:45:37 +0300
committerGravatar Vitaly Takmazov2017-11-03 13:45:37 +0300
commit03667020ae95ba855e21cc12a501962095899449 (patch)
tree47229939312737d6bb79d2f784d97831df837f14 /juick-api/src/main/java/com/juick/api/TelegramBotManager.java
parent80f6a6eb734fa8f07dbc1e89d4bde8b1db11d07d (diff)
api: better telegram messages
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