From f423f426a212d77d1f357baf7c275f49436b31e1 Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 10 May 2021 19:02:49 +0300 Subject: [PATCH] Improve handling of deleted group chats. --- telegram-bot-api/Client.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index ae8f08e..f227cb3 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -3682,9 +3682,7 @@ void Client::check_chat_access(int64 chat_id, AccessRights access_rights, const return fail_query(400, "Bad Request: group chat was upgraded to a supergroup chat", std::move(query), std::move(parameters)); } else { - LOG(WARNING) << "Group chat " << chat_info->group_id << " with " << group_info->member_count - << " members and title \"" << chat_info->title << "\" is deactivated"; - return fail_query(400, "Bad Request: group chat was deactivated", std::move(query)); + return fail_query(403, "Forbidden: the group chat was deleted", std::move(query)); } } if (group_info->is_active && group_info->kicked && need_edit_access) {