Skip to content

Commit ea0d241

Browse files
committed
Added the field allow_sending_without_reply to the methods sendMessage, sendPhoto, sendVideo, sendAnimation, sendAudio, sendDocument, sendSticker, sendVideoNote, sendVoice, sendLocation, sendVenue, sendContact, sendPoll, sendDice, sendInvoice, sendGame, sendMediaGroup to allow sending messages not a as reply if the replied-to message has already been deleted.
1 parent 1784b28 commit ea0d241

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

library/src/main/java/com/pengrad/telegrambot/request/AbstractSendRequest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ public T replyToMessageId(int replyToMessageId) {
2222
return add("reply_to_message_id", replyToMessageId);
2323
}
2424

25+
public T allowSendingWithoutReply(boolean allowSendingWithoutReply) {
26+
return add("allow_sending_without_reply", allowSendingWithoutReply);
27+
}
28+
2529
public T replyMarkup(Keyboard replyMarkup) {
2630
return add("reply_markup", replyMarkup);
2731
}

library/src/main/java/com/pengrad/telegrambot/request/SendMediaGroup.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ public SendMediaGroup replyToMessageId(int replyToMessageId) {
3434
return add("reply_to_message_id", replyToMessageId);
3535
}
3636

37+
public SendMediaGroup allowSendingWithoutReply(boolean allowSendingWithoutReply) {
38+
return add("allow_sending_without_reply", allowSendingWithoutReply);
39+
}
40+
3741
@Override
3842
public boolean isMultipart() {
3943
return isMultipart;

0 commit comments

Comments
 (0)