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<>();