aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'juick-api/src/main/java/com/juick')
-rw-r--r--juick-api/src/main/java/com/juick/api/TelegramBotHook.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/juick-api/src/main/java/com/juick/api/TelegramBotHook.java b/juick-api/src/main/java/com/juick/api/TelegramBotHook.java
index e1094ff6..f98bbc01 100644
--- a/juick-api/src/main/java/com/juick/api/TelegramBotHook.java
+++ b/juick-api/src/main/java/com/juick/api/TelegramBotHook.java
@@ -42,8 +42,8 @@ public class TelegramBotHook {
public TelegramBotHook(JdbcTemplate jdbc, String token) {
this.jdbc = jdbc;
bot = TelegramBotAdapter.build(token);
- bot.setWebhook("https://api.juick.com/tlgmbtwbhk");
try {
+ bot.setWebhook("https://api.juick.com/tlgmbtwbhk");
ws = new WebSocketFactory().createSocket("wss://ws.juick.com/_all");
ws.addHeader("Origin", "ws.juick.com");
ws.addHeader("Host", "ws.juick.com"); //TODO: remove from server
@@ -115,8 +115,8 @@ public class TelegramBotHook {
}
});
wsReply.connect();
- } catch (IOException | WebSocketException e) {
- logger.log(Level.SEVERE, "couldn't create ws connection", e);
+ } catch (Exception e) {
+ logger.log(Level.WARNING, "couldn't initialize telegram bot", e);
}
}