From a133545d4b419a49e3d931adf73bc186d56ec239 Mon Sep 17 00:00:00 2001 From: levlam Date: Sun, 14 Mar 2021 05:00:36 +0300 Subject: [PATCH] Treat self as a member in deactivated basic groups. --- telegram-bot-api/Client.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index 992ff67..3e93c8d 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -8003,6 +8003,9 @@ void Client::add_group(std::unordered_map &groups, object_ptr< group_info->kicked = group->status_->get_id() == td_api::chatMemberStatusBanned::ID; group_info->is_active = group->is_active_; group_info->upgraded_to_supergroup_id = group->upgraded_to_supergroup_id_; + if (!group_info->left && !group_info->kicked && group_info->member_count == 0) { + group_info->member_count = 1; + } } const Client::GroupInfo *Client::get_group_info(int32 group_id) const {