From c1febc78e9c216cf2a7a1645c9ce2dff00fbe605 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Sun, 19 Mar 2023 19:08:41 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=B2=D0=B5=D0=B1=D1=85=D1=83=D0=BA=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../telegram/quarkus/core/TelegramWebhookConnect.java | 2 +- .../godfather/telegram/simple/core/TelegramWebhookConnect.java | 2 +- .../godfather/telegram/domain/config/WebhookConfig.java | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/telegram-core/telegram-core-quarkus/src/main/java/dev/struchkov/godfather/telegram/quarkus/core/TelegramWebhookConnect.java b/telegram-core/telegram-core-quarkus/src/main/java/dev/struchkov/godfather/telegram/quarkus/core/TelegramWebhookConnect.java index 9e5dc16..83af9c6 100644 --- a/telegram-core/telegram-core-quarkus/src/main/java/dev/struchkov/godfather/telegram/quarkus/core/TelegramWebhookConnect.java +++ b/telegram-core/telegram-core-quarkus/src/main/java/dev/struchkov/godfather/telegram/quarkus/core/TelegramWebhookConnect.java @@ -21,7 +21,7 @@ public class TelegramWebhookConnect implements TelegramConnect { if (webhookConfig.isEnable()) { log.info("Инициализация webhook соединения. {}", telegramBotConfig.getWebhookConfig()); final SetWebhook setWebhook = SetWebhook.builder() - .url(webhookConfig.getRootUrl() + "/" + webhookConfig.getRootUrl() + "?webhookAccessKey=" + webhookConfig.getAccessKey()) + .url(webhookConfig.getRootUrl() + "/" + webhookConfig.getControllerPath() + "/" + webhookConfig.getPath() + "?webhookAccessKey=" + webhookConfig.getAccessKey()) .build(); bot.setWebhook(setWebhook); webhookBot = bot; diff --git a/telegram-core/telegram-core-simple/src/main/java/dev/struchkov/godfather/telegram/simple/core/TelegramWebhookConnect.java b/telegram-core/telegram-core-simple/src/main/java/dev/struchkov/godfather/telegram/simple/core/TelegramWebhookConnect.java index 4a9ffd3..9b226ba 100644 --- a/telegram-core/telegram-core-simple/src/main/java/dev/struchkov/godfather/telegram/simple/core/TelegramWebhookConnect.java +++ b/telegram-core/telegram-core-simple/src/main/java/dev/struchkov/godfather/telegram/simple/core/TelegramWebhookConnect.java @@ -25,7 +25,7 @@ public class TelegramWebhookConnect implements TelegramConnect { if (webhookConfig.isEnable()) { log.info("Инициализация webhook соединения. {}", telegramBotConfig.getWebhookConfig()); final SetWebhook setWebhook = SetWebhook.builder() - .url(webhookConfig.getRootUrl() + "/" + webhookConfig.getRootUrl() + "callback" + "?webhookAccessKey=" + webhookConfig.getAccessKey()) + .url(webhookConfig.getRootUrl() + "/" + webhookConfig.getControllerPath() + "/" + webhookConfig.getPath() + "?webhookAccessKey=" + webhookConfig.getAccessKey()) .build(); bot.setWebhook(setWebhook); webhookBot = bot; diff --git a/telegram-domain/telegram-domain-main/src/main/java/dev/struchkov/godfather/telegram/domain/config/WebhookConfig.java b/telegram-domain/telegram-domain-main/src/main/java/dev/struchkov/godfather/telegram/domain/config/WebhookConfig.java index 1df2c2c..7bd9a3a 100644 --- a/telegram-domain/telegram-domain-main/src/main/java/dev/struchkov/godfather/telegram/domain/config/WebhookConfig.java +++ b/telegram-domain/telegram-domain-main/src/main/java/dev/struchkov/godfather/telegram/domain/config/WebhookConfig.java @@ -14,6 +14,9 @@ public class WebhookConfig { @ToString.Exclude private String rootUrl; + @ToString.Exclude + private String controllerPath; + @ToString.Exclude private String path;