Treat self as a member in deactivated basic groups.

This commit is contained in:
levlam 2021-03-14 05:00:36 +03:00
parent 202ddaffab
commit a133545d4b

View File

@ -8003,6 +8003,9 @@ void Client::add_group(std::unordered_map<int32, GroupInfo> &groups, object_ptr<
group_info->kicked = group->status_->get_id() == td_api::chatMemberStatusBanned::ID; group_info->kicked = group->status_->get_id() == td_api::chatMemberStatusBanned::ID;
group_info->is_active = group->is_active_; group_info->is_active = group->is_active_;
group_info->upgraded_to_supergroup_id = group->upgraded_to_supergroup_id_; 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 { const Client::GroupInfo *Client::get_group_info(int32 group_id) const {