From a1794007166b175f221a7504e0a191e53361fbcf Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 10 Jul 2026 23:06:53 +0300 Subject: Add ChatFullInfo.community. --- telegram-bot-api/Client.cpp | 8 ++++++++ telegram-bot-api/Client.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index 66759f7..444c43d 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -1597,6 +1597,9 @@ class Client::JsonChat final : public td::Jsonable { if (user_info->personal_chat_id != 0) { object("personal_chat", JsonChat(user_info->personal_chat_id, client_)); } + if (user_info->community_id != 0) { + object("community", JsonCommunity(user_info->community_id, client_)); + } if (user_info->rating != nullptr) { object("rating", JsonUserRating(user_info->rating.get())); } @@ -1721,6 +1724,9 @@ class Client::JsonChat final : public td::Jsonable { if (supergroup_info->guard_bot_user_id != 0) { object("guard_bot", JsonUser(supergroup_info->guard_bot_user_id, client_)); } + if (supergroup_info->community_id != 0) { + object("community", JsonCommunity(supergroup_info->community_id, client_)); + } if (supergroup_info->location != nullptr) { object("location", JsonChatLocation(supergroup_info->location.get())); } @@ -9674,6 +9680,7 @@ void Client::on_update(object_ptr result) { user_info->personal_chat_id = full_info->personal_chat_id_; user_info->has_private_forwards = full_info->has_private_forwards_; user_info->has_restricted_voice_and_video_messages = full_info->has_restricted_voice_and_video_note_messages_; + user_info->community_id = full_info->community_id_; break; } case td_api::updateBasicGroup::ID: { @@ -9724,6 +9731,7 @@ void Client::on_update(object_ptr result) { supergroup_info->linked_chat_id = full_info->linked_chat_id_; supergroup_info->direct_messages_chat_id = full_info->direct_messages_chat_id_; supergroup_info->guard_bot_user_id = full_info->guard_bot_user_id_; + supergroup_info->community_id = full_info->community_id_; supergroup_info->location = std::move(full_info->location_); supergroup_info->has_hidden_members = full_info->has_hidden_members_; supergroup_info->has_aggressive_anti_spam_enabled = full_info->has_aggressive_anti_spam_enabled_; diff --git a/telegram-bot-api/Client.h b/telegram-bot-api/Client.h index 7825fe3..593f1fd 100644 --- a/telegram-bot-api/Client.h +++ b/telegram-bot-api/Client.h @@ -1117,6 +1117,7 @@ class Client final : public WebhookActor::Callback { object_ptr first_profile_audio; int64 personal_chat_id = 0; int64 paid_message_star_count = 0; + int64 community_id = 0; bool have_access = false; bool can_join_groups = false; @@ -1167,6 +1168,7 @@ class Client final : public WebhookActor::Callback { int64 direct_messages_chat_id = 0; int64 paid_message_star_count = 0; int64 guard_bot_user_id = 0; + int64 community_id = 0; object_ptr location; object_ptr status; bool is_supergroup = false; -- cgit v1.2.3