Add User.can_connect_to_business.

This commit is contained in:
levlam 2024-03-28 19:40:12 +03:00
parent f706d88055
commit 5f6e1a262f
2 changed files with 3 additions and 0 deletions

View File

@ -416,6 +416,7 @@ class Client::JsonUser final : public td::Jsonable {
object("can_join_groups", td::JsonBool(user_info->can_join_groups)); object("can_join_groups", td::JsonBool(user_info->can_join_groups));
object("can_read_all_group_messages", td::JsonBool(user_info->can_read_all_group_messages)); object("can_read_all_group_messages", td::JsonBool(user_info->can_read_all_group_messages));
object("supports_inline_queries", td::JsonBool(user_info->is_inline_bot)); object("supports_inline_queries", td::JsonBool(user_info->is_inline_bot));
object("can_connect_to_business", td::JsonBool(user_info->can_connect_to_business));
} }
} }
@ -12115,6 +12116,7 @@ void Client::add_user(UserInfo *user_info, object_ptr<td_api::user> &&user) {
user_info->can_join_groups = bot->can_join_groups_; user_info->can_join_groups = bot->can_join_groups_;
user_info->can_read_all_group_messages = bot->can_read_all_group_messages_; user_info->can_read_all_group_messages = bot->can_read_all_group_messages_;
user_info->is_inline_bot = bot->is_inline_; user_info->is_inline_bot = bot->is_inline_;
user_info->can_connect_to_business = bot->can_connect_to_business_;
break; break;
} }
case td_api::userTypeDeleted::ID: case td_api::userTypeDeleted::ID:

View File

@ -809,6 +809,7 @@ class Client final : public WebhookActor::Callback {
bool have_access = false; bool have_access = false;
bool can_join_groups = false; bool can_join_groups = false;
bool can_read_all_group_messages = false; bool can_read_all_group_messages = false;
bool can_connect_to_business = false;
bool is_inline_bot = false; bool is_inline_bot = false;
bool has_private_forwards = false; bool has_private_forwards = false;
bool has_restricted_voice_and_video_messages = false; bool has_restricted_voice_and_video_messages = false;