diff options
author | llnulldisk <48621230+llnulldisk@users.noreply.github.com> | 2022-09-04 21:18:17 +0200 |
---|---|---|
committer | llnulldisk <48621230+llnulldisk@users.noreply.github.com> | 2022-09-04 21:18:17 +0200 |
commit | 5c9062ab3c3bff1fa1fb5b5288dda0cf5d0acf54 (patch) | |
tree | f64bf217f53f3b5ff2ba48711ff05cf50ca1aa3a /src/Api.cpp | |
parent | 5a72b4b1fc89d9b6033f929d9bf4f6e30d7f9698 (diff) |
Update to API 5.5
Diffstat (limited to 'src/Api.cpp')
-rw-r--r-- | src/Api.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
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<bool>("", false); } +bool Api::banChatSenderChat(std::int64_t chatId, + std::int64_t senderChatId) const { + vector<HttpReqArg> args; + args.reserve(2); + + args.emplace_back("chat_id", chatId); + args.emplace_back("sender_chat_id", senderChatId); + + return sendRequest("banChatSenderChat", args).get<bool>("", false); +} + +bool Api::unbanChatSenderChat(std::int64_t chatId, + std::int64_t senderChatId) const { + vector<HttpReqArg> args; + args.reserve(2); + + args.emplace_back("chat_id", chatId); + args.emplace_back("sender_chat_id", senderChatId); + + return sendRequest("unbanChatSenderChat", args).get<bool>("", false); +} + bool Api::setChatPermissions(std::int64_t chatId, ChatPermissions::Ptr permissions) const { vector<HttpReqArg> args; args.reserve(2); |