From e960c273a06bee7c2f000a9a33f91e1ba5228236 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Sat, 1 Apr 2023 21:46:15 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=B7=D0=B0=D0=BF=D0=BE=D0=BB=D0=BD=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20SentBox=20=D0=BF=D1=80=D0=B8=20replace?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../godfather/telegram/main/context/BoxAnswerPayload.java | 2 +- .../godfather/telegram/simple/core/TelegramPollingBot.java | 5 ----- .../godfather/telegram/quarkus/sender/TelegramSender.java | 3 ++- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/telegram-context/telegram-context-main/src/main/java/dev/struchkov/godfather/telegram/main/context/BoxAnswerPayload.java b/telegram-context/telegram-context-main/src/main/java/dev/struchkov/godfather/telegram/main/context/BoxAnswerPayload.java index 2b54734..52f326e 100644 --- a/telegram-context/telegram-context-main/src/main/java/dev/struchkov/godfather/telegram/main/context/BoxAnswerPayload.java +++ b/telegram-context/telegram-context-main/src/main/java/dev/struchkov/godfather/telegram/main/context/BoxAnswerPayload.java @@ -8,7 +8,7 @@ public final class BoxAnswerPayload { public static final ContextKey DISABLE_WEB_PAGE_PREVIEW = ContextKey.of("DISABLE_WEB_PAGE_PREVIEW", Boolean.class); public static final ContextKey DISABLE_NOTIFICATION = ContextKey.of("DISABLE_NOTIFICATION", Boolean.class); - public static final ContextKey ENABLE_MARKDOWN = ContextKey.of("DISABLE_MARKDOWN", Boolean.class); + public static final ContextKey ENABLE_MARKDOWN = ContextKey.of("ENABLE_MARKDOWN", Boolean.class); public static final ContextKey INVOICE = ContextKey.of("INVOICE", SendInvoice.class); private BoxAnswerPayload() { diff --git a/telegram-core/telegram-core-simple/src/main/java/dev/struchkov/godfather/telegram/simple/core/TelegramPollingBot.java b/telegram-core/telegram-core-simple/src/main/java/dev/struchkov/godfather/telegram/simple/core/TelegramPollingBot.java index 64df833..f2ec6cf 100644 --- a/telegram-core/telegram-core-simple/src/main/java/dev/struchkov/godfather/telegram/simple/core/TelegramPollingBot.java +++ b/telegram-core/telegram-core-simple/src/main/java/dev/struchkov/godfather/telegram/simple/core/TelegramPollingBot.java @@ -11,11 +11,6 @@ import org.telegram.telegrambots.meta.bots.AbsSender; import static dev.struchkov.haiti.utils.Checker.checkNotNull; -/** - * TODO: Добавить описание класса. - * - * @author upagge [15/07/2019] - */ public class TelegramPollingBot extends TelegramLongPollingBot implements TelegramBot { private final TelegramBotConfig telegramBotConfig; diff --git a/telegram-sender/telegram-sender-quarkus/src/main/java/dev/struchkov/godfather/telegram/quarkus/sender/TelegramSender.java b/telegram-sender/telegram-sender-quarkus/src/main/java/dev/struchkov/godfather/telegram/quarkus/sender/TelegramSender.java index 527c4aa..315134a 100644 --- a/telegram-sender/telegram-sender-quarkus/src/main/java/dev/struchkov/godfather/telegram/quarkus/sender/TelegramSender.java +++ b/telegram-sender/telegram-sender-quarkus/src/main/java/dev/struchkov/godfather/telegram/quarkus/sender/TelegramSender.java @@ -182,9 +182,10 @@ public class TelegramSender implements TelegramSending { return Uni.createFrom().completionStage(executeAsync(editMessageText)) .onItem().ifNotNull().transform(t -> { final SentBox sentBox = new SentBox(); + sentBox.setPersonId(telegramId); + sentBox.setMessageId(lastMessageId); sentBox.setSentAnswer(boxAnswer); sentBox.setOriginalAnswer(boxAnswer); - sentBox.setMessageId(telegramId); return sentBox; }) .onFailure(TelegramApiRequestException.class).recoverWithUni(