From 586b8c1b998736f352e33fedd2e9330e52f89d5e Mon Sep 17 00:00:00 2001 From: Stas Parshin Date: Thu, 7 Dec 2017 23:11:23 +0700 Subject: [PATCH] Added field can_invite_users to the promoteChatMember method --- .../com/pengrad/telegrambot/request/PromoteChatMember.java | 4 ++++ .../test/java/com/pengrad/telegrambot/TelegramBotTest.java | 1 + 2 files changed, 5 insertions(+) diff --git a/library/src/main/java/com/pengrad/telegrambot/request/PromoteChatMember.java b/library/src/main/java/com/pengrad/telegrambot/request/PromoteChatMember.java index fc1f8a5f..4e38230f 100644 --- a/library/src/main/java/com/pengrad/telegrambot/request/PromoteChatMember.java +++ b/library/src/main/java/com/pengrad/telegrambot/request/PromoteChatMember.java @@ -29,6 +29,10 @@ public PromoteChatMember canDeleteMessages(boolean canDeleteMessages) { return add("can_delete_messages", canDeleteMessages); } + public PromoteChatMember canInviteUsers(boolean canInviteUsers) { + return add("can_invite_users", canInviteUsers); + } + public PromoteChatMember canRestrictMembers(boolean canRestrictMembers) { return add("can_restrict_members", canRestrictMembers); } diff --git a/library/src/test/java/com/pengrad/telegrambot/TelegramBotTest.java b/library/src/test/java/com/pengrad/telegrambot/TelegramBotTest.java index 309766a9..afcaa353 100644 --- a/library/src/test/java/com/pengrad/telegrambot/TelegramBotTest.java +++ b/library/src/test/java/com/pengrad/telegrambot/TelegramBotTest.java @@ -148,6 +148,7 @@ public void promoteChatMember() { .canPostMessages(false) .canEditMessages(false) .canDeleteMessages(false) + .canInviteUsers(false) .canRestrictMembers(false) .canPinMessages(false) .canPromoteMembers(false));