added BoxAnswerPayload.THREAD_ID
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
e64396522b
commit
763e08e96e
@ -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_MARKDOWN = ContextKey.of("ENABLE_MARKDOWN", Boolean.class);
|
||||||
public static final ContextKey<Boolean> ENABLE_HTML = ContextKey.of("ENABLE_HTML", 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<SendInvoice> INVOICE = ContextKey.of("INVOICE", SendInvoice.class);
|
||||||
|
public static final ContextKey<Integer> THREAD_ID = ContextKey.of("THREAD_ID", Integer.class);
|
||||||
|
|
||||||
private BoxAnswerPayload() {
|
private BoxAnswerPayload() {
|
||||||
Exceptions.utilityClass();
|
Exceptions.utilityClass();
|
||||||
|
@ -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.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_HTML;
|
||||||
import static dev.struchkov.godfather.telegram.main.context.BoxAnswerPayload.ENABLE_MARKDOWN;
|
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.convertInlineKeyBoard;
|
||||||
import static dev.struchkov.godfather.telegram.main.sender.util.KeyBoardConvert.convertKeyBoard;
|
import static dev.struchkov.godfather.telegram.main.sender.util.KeyBoardConvert.convertKeyBoard;
|
||||||
import static dev.struchkov.haiti.utils.Checker.checkNotBlank;
|
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_MARKDOWN).ifPresent(sendMessage::enableMarkdown);
|
||||||
boxAnswer.getPayLoad(ENABLE_HTML).ifPresent(sendMessage::enableHtml);
|
boxAnswer.getPayLoad(ENABLE_HTML).ifPresent(sendMessage::enableHtml);
|
||||||
|
boxAnswer.getPayLoad(THREAD_ID).ifPresent(sendMessage::setMessageThreadId);
|
||||||
boxAnswer.getPayLoad(DISABLE_WEB_PAGE_PREVIEW).ifPresent(isDisable -> {
|
boxAnswer.getPayLoad(DISABLE_WEB_PAGE_PREVIEW).ifPresent(isDisable -> {
|
||||||
if (TRUE.equals(isDisable)) sendMessage.disableWebPagePreview();
|
if (TRUE.equals(isDisable)) sendMessage.disableWebPagePreview();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user