This commit is contained in:
parent
2f3d7b9b10
commit
c1febc78e9
@ -21,7 +21,7 @@ public class TelegramWebhookConnect implements TelegramConnect {
|
|||||||
if (webhookConfig.isEnable()) {
|
if (webhookConfig.isEnable()) {
|
||||||
log.info("Инициализация webhook соединения. {}", telegramBotConfig.getWebhookConfig());
|
log.info("Инициализация webhook соединения. {}", telegramBotConfig.getWebhookConfig());
|
||||||
final SetWebhook setWebhook = SetWebhook.builder()
|
final SetWebhook setWebhook = SetWebhook.builder()
|
||||||
.url(webhookConfig.getRootUrl() + "/" + webhookConfig.getRootUrl() + "?webhookAccessKey=" + webhookConfig.getAccessKey())
|
.url(webhookConfig.getRootUrl() + "/" + webhookConfig.getControllerPath() + "/" + webhookConfig.getPath() + "?webhookAccessKey=" + webhookConfig.getAccessKey())
|
||||||
.build();
|
.build();
|
||||||
bot.setWebhook(setWebhook);
|
bot.setWebhook(setWebhook);
|
||||||
webhookBot = bot;
|
webhookBot = bot;
|
||||||
|
@ -25,7 +25,7 @@ public class TelegramWebhookConnect implements TelegramConnect {
|
|||||||
if (webhookConfig.isEnable()) {
|
if (webhookConfig.isEnable()) {
|
||||||
log.info("Инициализация webhook соединения. {}", telegramBotConfig.getWebhookConfig());
|
log.info("Инициализация webhook соединения. {}", telegramBotConfig.getWebhookConfig());
|
||||||
final SetWebhook setWebhook = SetWebhook.builder()
|
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();
|
.build();
|
||||||
bot.setWebhook(setWebhook);
|
bot.setWebhook(setWebhook);
|
||||||
webhookBot = bot;
|
webhookBot = bot;
|
||||||
|
@ -14,6 +14,9 @@ public class WebhookConfig {
|
|||||||
@ToString.Exclude
|
@ToString.Exclude
|
||||||
private String rootUrl;
|
private String rootUrl;
|
||||||
|
|
||||||
|
@ToString.Exclude
|
||||||
|
private String controllerPath;
|
||||||
|
|
||||||
@ToString.Exclude
|
@ToString.Exclude
|
||||||
private String path;
|
private String path;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user