pre-release

This commit is contained in:
Struchkov Mark 2023-04-26 20:24:46 +03:00
parent 0c5ef4b3bf
commit 0ea693f54a
Signed by: upagge
GPG Key ID: D3018BE7BA428CA6
2 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<godfather.core.ver>0.0.60</godfather.core.ver>
<godfather.core.ver>0.0.61</godfather.core.ver>
<!-- https://mvnrepository.com/artifact/org.telegram/telegrambots -->
<telegrambots.ver>6.5.0</telegrambots.ver>

View File

@ -40,12 +40,12 @@ public class WebhookController {
public Uni<Response> updateReceived(@PathParam("webhookPath") String botPath, @HeaderParam("X-Telegram-Bot-Api-Secret-Token") String secretTokenFromTelegram, Update update) {
return Uni.createFrom().voidItem()
.invoke(() -> {
log.debug("Получено webhook событие");
log.trace("Получено webhook событие: {}", update);
isTrue(pathKey.equals(botPath), accessException(ERROR_ACCESS));
isTrue(secretToken.equals(secretTokenFromTelegram), accessException(ERROR_ACCESS));
})
.call(() -> eventDistributor.processing(update))
.invoke(() -> log.debug("Сообщили Telegram, что вебхук событие обработано"))
.invoke(() -> log.trace("Сообщили Telegram, что вебхук событие обработано. Идентификатор события: {}", update.getUpdateId()))
.map(ignored -> Response.ok().build());
}