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

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 replyToMessageId;
/**
* Клавиатура - меню.
*/
@ -73,6 +78,7 @@ public class BoxAnswer {
recipientPersonId = builder.recipientPersonId;
payload = builder.payload;
attachment = builder.attachment;
replyToMessageId = builder.replyToMessageId;
}
public static BoxAnswer boxAnswer(boolean replace, String message) {
@ -150,6 +156,7 @@ public class BoxAnswer {
public static final class Builder {
private String message;
private String replyToMessageId;
private KeyBoard keyBoard;
private boolean replace;
private String replaceMessageId;
@ -165,6 +172,11 @@ public class BoxAnswer {
return this;
}
public Builder replyToMessageId(String val) {
replyToMessageId = val;
return this;
}
public Builder keyBoard(KeyBoard val) {
keyBoard = val;
return this;
@ -206,7 +218,6 @@ public class BoxAnswer {
return this;
}
public BoxAnswer build() {
return new BoxAnswer(this);
}