diff options
author | 2018-12-01 20:32:40 +0300 | |
---|---|---|
committer | 2018-12-01 20:32:40 +0300 | |
commit | 5d06aa2ca4d1dc0d304e98fef6ac6a9108e0db9f (patch) | |
tree | 67a394f5faee7acc2b7bba862e5b55e7319a22e2 /src/main/java/com/juick/server/TelegramBotManager.java | |
parent | f470a96b9cd20bc42651d99178df1e0ca031ca3e (diff) |
Telegram library from jitpack
Diffstat (limited to 'src/main/java/com/juick/server/TelegramBotManager.java')
-rw-r--r-- | src/main/java/com/juick/server/TelegramBotManager.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/com/juick/server/TelegramBotManager.java b/src/main/java/com/juick/server/TelegramBotManager.java index 1836ffa9..518a7363 100644 --- a/src/main/java/com/juick/server/TelegramBotManager.java +++ b/src/main/java/com/juick/server/TelegramBotManager.java @@ -73,6 +73,10 @@ public class TelegramBotManager implements NotificationListener { private TelegramBot bot; + @Value("${telegram_api_url:}") + private String apiUrl; + @Value("${telegram_file_api_url:}") + private String fileApiUrl; @Value("${telegram_token:12345678}") private String telegramToken; @Value("${telegram_debug:false}") @@ -98,7 +102,8 @@ public class TelegramBotManager implements NotificationListener { logger.info("telegram token is not set, exiting"); return; } - bot = new TelegramBot(telegramToken); + bot = new TelegramBot.Builder(telegramToken) + .apiUrl(apiUrl).fileApiUrl(fileApiUrl).build(); if (!telegramDebug) { try { SetWebhook webhook = new SetWebhook().url("https://api.juick.com/tlgmbtwbhk"); |