added BoxAnswerPayload.THREAD_ID
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Struchkov Mark 2024-09-04 00:19:07 +03:00
parent e64396522b
commit 763e08e96e
No known key found for this signature in database
GPG Key ID: A3F0AC3F0FA52F3C
2 changed files with 3 additions and 0 deletions

View File

@ -11,6 +11,7 @@ public final class BoxAnswerPayload {
public static final ContextKey<Boolean> ENABLE_MARKDOWN = ContextKey.of("ENABLE_MARKDOWN", Boolean.class);
public static final ContextKey<Boolean> ENABLE_HTML = ContextKey.of("ENABLE_HTML", Boolean.class);
public static final ContextKey<SendInvoice> INVOICE = ContextKey.of("INVOICE", SendInvoice.class);
public static final ContextKey<Integer> THREAD_ID = ContextKey.of("THREAD_ID", Integer.class);
private BoxAnswerPayload() {
Exceptions.utilityClass();

View File

@ -41,6 +41,7 @@ import static dev.struchkov.godfather.telegram.main.context.BoxAnswerPayload.DIS
import static dev.struchkov.godfather.telegram.main.context.BoxAnswerPayload.DISABLE_WEB_PAGE_PREVIEW;
import static dev.struchkov.godfather.telegram.main.context.BoxAnswerPayload.ENABLE_HTML;
import static dev.struchkov.godfather.telegram.main.context.BoxAnswerPayload.ENABLE_MARKDOWN;
import static dev.struchkov.godfather.telegram.main.context.BoxAnswerPayload.THREAD_ID;
import static dev.struchkov.godfather.telegram.main.sender.util.KeyBoardConvert.convertInlineKeyBoard;
import static dev.struchkov.godfather.telegram.main.sender.util.KeyBoardConvert.convertKeyBoard;
import static dev.struchkov.haiti.utils.Checker.checkNotBlank;
@ -418,6 +419,7 @@ public class TelegramSender implements TelegramSending {
boxAnswer.getPayLoad(ENABLE_MARKDOWN).ifPresent(sendMessage::enableMarkdown);
boxAnswer.getPayLoad(ENABLE_HTML).ifPresent(sendMessage::enableHtml);
boxAnswer.getPayLoad(THREAD_ID).ifPresent(sendMessage::setMessageThreadId);
boxAnswer.getPayLoad(DISABLE_WEB_PAGE_PREVIEW).ifPresent(isDisable -> {
if (TRUE.equals(isDisable)) sendMessage.disableWebPagePreview();
});