aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.gradle4
-rw-r--r--settings.gradle2
-rw-r--r--src/main/java/com/juick/server/TelegramBotManager.java7
3 files changed, 8 insertions, 5 deletions
diff --git a/build.gradle b/build.gradle
index 9c797ee2..7e212ed1 100644
--- a/build.gradle
+++ b/build.gradle
@@ -9,7 +9,7 @@ buildscript {
}
}
plugins {
- id 'org.springframework.boot' version '2.1.0.RELEASE' apply false
+ id 'org.springframework.boot' version '2.1.1.RELEASE' apply false
id "com.moowork.node" version "1.2.0" apply false
id("org.asciidoctor.convert") version "1.5.9.2" apply false
}
@@ -138,7 +138,7 @@ dependencies {
compile 'org.apache.commons:commons-email:1.5'
compile 'com.github.scribejava:scribejava-apis:6.1.0'
- compile project(':java-telegram-bot-api:library')
+ compile 'com.github.vitalyster:java-telegram-bot-api:file_api-SNAPSHOT'
compile 'com.twelvemonkeys.imageio:imageio-jpeg:3.4.1'
compile 'org.imgscalr:imgscalr-lib:4.2'
compile 'org.twitter4j:twitter4j-core:4.0.7'
diff --git a/settings.gradle b/settings.gradle
index 32e94b8e..e125db9d 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,3 +1 @@
rootProject.name = "Juick"
-
-include ':java-telegram-bot-api:library'
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");