Добавил возможность отвечать на сообщения

This commit is contained in:
Struchkov Mark 2023-05-10 00:37:33 +03:00
parent abe77e1c1c
commit 09c93347a2
Signed by: upagge
GPG Key ID: D3018BE7BA428CA6

View File

@ -41,6 +41,11 @@ public class BoxAnswer {
*/ */
private String replaceMessageId; private String replaceMessageId;
/**
* Идентификатор сообщения, на которое отвечаем.
*/
private String replyToMessageId;
/** /**
* Клавиатура - меню. * Клавиатура - меню.
*/ */
@ -73,6 +78,7 @@ public class BoxAnswer {
recipientPersonId = builder.recipientPersonId; recipientPersonId = builder.recipientPersonId;
payload = builder.payload; payload = builder.payload;
attachment = builder.attachment; attachment = builder.attachment;
replyToMessageId = builder.replyToMessageId;
} }
public static BoxAnswer boxAnswer(boolean replace, String message) { public static BoxAnswer boxAnswer(boolean replace, String message) {
@ -150,6 +156,7 @@ public class BoxAnswer {
public static final class Builder { public static final class Builder {
private String message; private String message;
private String replyToMessageId;
private KeyBoard keyBoard; private KeyBoard keyBoard;
private boolean replace; private boolean replace;
private String replaceMessageId; private String replaceMessageId;
@ -165,6 +172,11 @@ public class BoxAnswer {
return this; return this;
} }
public Builder replyToMessageId(String val) {
replyToMessageId = val;
return this;
}
public Builder keyBoard(KeyBoard val) { public Builder keyBoard(KeyBoard val) {
keyBoard = val; keyBoard = val;
return this; return this;
@ -206,7 +218,6 @@ public class BoxAnswer {
return this; return this;
} }
public BoxAnswer build() { public BoxAnswer build() {
return new BoxAnswer(this); return new BoxAnswer(this);
} }