Skip to content

add param format in editText #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ public ApiResponse editText(final EditTextRequest request) throws IOException {
request.getChatId(),
request.getMsgId(),
request.getNewText(),
request.getFormat(),
request.getKeyboard()
);
}
Expand All @@ -158,7 +159,7 @@ public ApiResponse editText(
final long msgId,
final String text
) throws IOException {
return client.messages().editText(chatId, msgId, text, null);
return client.messages().editText(chatId, msgId, text, null, null);
}

public ApiResponse deleteMessage(final DeleteMessagesRequest request) throws IOException {
Expand Down
1 change: 1 addition & 0 deletions library/src/main/java/ru/mail/im/botapi/api/Messages.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ ApiResponse editText(
@RequestParam("chatId") final String chatId,
@RequestParam("msgId") final long msgId,
@RequestParam("text") final String newText,
@RequestParam("format") final String format,
@RequestParam("inlineKeyboardMarkup") final List<List<InlineKeyboardButton>> keyboard
) throws IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ public class EditTextRequest {
private String chatId;
private long msgId;
private String newText;
private String format;
private List<List<InlineKeyboardButton>> keyboard;

public String getChatId() {
Expand Down Expand Up @@ -43,4 +44,13 @@ public EditTextRequest setKeyboard(final List<List<InlineKeyboardButton>> keyboa
this.keyboard = keyboard;
return this;
}

public String getFormat() {
return format;
}

public EditTextRequest setFormat(String format) {
this.format = format;
return this;
}
}