From 5c9062ab3c3bff1fa1fb5b5288dda0cf5d0acf54 Mon Sep 17 00:00:00 2001 From: llnulldisk <48621230+llnulldisk@users.noreply.github.com> Date: Sun, 4 Sep 2022 21:18:17 +0200 Subject: Update to API 5.5 --- src/Api.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/Api.cpp') diff --git a/src/Api.cpp b/src/Api.cpp index ad9f544..c1c86d2 100644 --- a/src/Api.cpp +++ b/src/Api.cpp @@ -1041,6 +1041,28 @@ bool Api::setChatAdministratorCustomTitle(std::int64_t chatId, std::int64_t user return sendRequest("setChatAdministratorCustomTitle", args).get("", false); } +bool Api::banChatSenderChat(std::int64_t chatId, + std::int64_t senderChatId) const { + vector args; + args.reserve(2); + + args.emplace_back("chat_id", chatId); + args.emplace_back("sender_chat_id", senderChatId); + + return sendRequest("banChatSenderChat", args).get("", false); +} + +bool Api::unbanChatSenderChat(std::int64_t chatId, + std::int64_t senderChatId) const { + vector args; + args.reserve(2); + + args.emplace_back("chat_id", chatId); + args.emplace_back("sender_chat_id", senderChatId); + + return sendRequest("unbanChatSenderChat", args).get("", false); +} + bool Api::setChatPermissions(std::int64_t chatId, ChatPermissions::Ptr permissions) const { vector args; args.reserve(2); -- cgit v1.2.3