From 891a19024da4ed76827ba7bdbd10f32484d59548 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Mon, 24 Jun 2024 18:06:26 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=B2=20ButtonClickAttachment=20messageId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../telegram/main/context/convert/CallbackQueryConvert.java | 1 + .../telegram/domain/attachment/ButtonClickAttachment.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/telegram-context/telegram-context-main/src/main/java/dev/struchkov/godfather/telegram/main/context/convert/CallbackQueryConvert.java b/telegram-context/telegram-context-main/src/main/java/dev/struchkov/godfather/telegram/main/context/convert/CallbackQueryConvert.java index d13e5b5..7c06395 100644 --- a/telegram-context/telegram-context-main/src/main/java/dev/struchkov/godfather/telegram/main/context/convert/CallbackQueryConvert.java +++ b/telegram-context/telegram-context-main/src/main/java/dev/struchkov/godfather/telegram/main/context/convert/CallbackQueryConvert.java @@ -39,6 +39,7 @@ public class CallbackQueryConvert { private static ButtonClickAttachment convertToButtonClick(String callbackData, MaybeInaccessibleMessage maybeInaccessibleMessage) { final ButtonClickAttachment buttonClickAttachment = new ButtonClickAttachment(); buttonClickAttachment.setRawCallBackData(callbackData); + buttonClickAttachment.setMessageId(maybeInaccessibleMessage.getMessageId().toString()); if (maybeInaccessibleMessage instanceof Message message) { buttonClickAttachment.setMaybeInaccessibleMessage(MessageMailConvert.apply(message)); } diff --git a/telegram-domain/telegram-domain-main/src/main/java/dev/struchkov/godfather/telegram/domain/attachment/ButtonClickAttachment.java b/telegram-domain/telegram-domain-main/src/main/java/dev/struchkov/godfather/telegram/domain/attachment/ButtonClickAttachment.java index d7de9f4..3727428 100644 --- a/telegram-domain/telegram-domain-main/src/main/java/dev/struchkov/godfather/telegram/domain/attachment/ButtonClickAttachment.java +++ b/telegram-domain/telegram-domain-main/src/main/java/dev/struchkov/godfather/telegram/domain/attachment/ButtonClickAttachment.java @@ -18,8 +18,9 @@ import static dev.struchkov.haiti.utils.Inspector.isNotNull; @Setter public class ButtonClickAttachment extends Attachment { - private String rawCallBackData; + private String messageId; private Mail maybeInaccessibleMessage; + private String rawCallBackData; private Map args = new HashMap<>();