Добавил в ButtonClickAttachment messageId
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Struchkov Mark 2024-06-24 18:06:26 +03:00
parent 24173d7e55
commit 891a19024d
No known key found for this signature in database
GPG Key ID: A3F0AC3F0FA52F3C
2 changed files with 3 additions and 1 deletions

View File

@ -39,6 +39,7 @@ public class CallbackQueryConvert {
private static ButtonClickAttachment convertToButtonClick(String callbackData, MaybeInaccessibleMessage maybeInaccessibleMessage) { private static ButtonClickAttachment convertToButtonClick(String callbackData, MaybeInaccessibleMessage maybeInaccessibleMessage) {
final ButtonClickAttachment buttonClickAttachment = new ButtonClickAttachment(); final ButtonClickAttachment buttonClickAttachment = new ButtonClickAttachment();
buttonClickAttachment.setRawCallBackData(callbackData); buttonClickAttachment.setRawCallBackData(callbackData);
buttonClickAttachment.setMessageId(maybeInaccessibleMessage.getMessageId().toString());
if (maybeInaccessibleMessage instanceof Message message) { if (maybeInaccessibleMessage instanceof Message message) {
buttonClickAttachment.setMaybeInaccessibleMessage(MessageMailConvert.apply(message)); buttonClickAttachment.setMaybeInaccessibleMessage(MessageMailConvert.apply(message));
} }

View File

@ -18,8 +18,9 @@ import static dev.struchkov.haiti.utils.Inspector.isNotNull;
@Setter @Setter
public class ButtonClickAttachment extends Attachment { public class ButtonClickAttachment extends Attachment {
private String rawCallBackData; private String messageId;
private Mail maybeInaccessibleMessage; private Mail maybeInaccessibleMessage;
private String rawCallBackData;
private Map<String, ButtonArg> args = new HashMap<>(); private Map<String, ButtonArg> args = new HashMap<>();