diff options
Diffstat (limited to 'src/main')
-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"); |