diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index 634be59..0af34b7 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -1292,6 +1292,9 @@ class Client::JsonChat final : public td::Jsonable { if (supergroup_info->linked_chat_id != 0) { object("linked_chat_id", supergroup_info->linked_chat_id); } + if (supergroup_info->is_direct_messages && supergroup_info->direct_messages_chat_id != 0) { + object("parent_chat", JsonChat(supergroup_info->direct_messages_chat_id, client_)); + } if (supergroup_info->location != nullptr) { object("location", JsonChatLocation(supergroup_info->location.get())); } @@ -8008,6 +8011,7 @@ void Client::on_update(object_ptr result) { supergroup_info->slow_mode_delay = full_info->slow_mode_delay_; supergroup_info->unrestrict_boost_count = full_info->unrestrict_boost_count_; supergroup_info->linked_chat_id = full_info->linked_chat_id_; + supergroup_info->direct_messages_chat_id = full_info->direct_messages_chat_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 dc4be2e..5653ab8 100644 --- a/telegram-bot-api/Client.h +++ b/telegram-bot-api/Client.h @@ -969,6 +969,7 @@ class Client final : public WebhookActor::Callback { int32 slow_mode_delay = 0; int32 unrestrict_boost_count = 0; int64 linked_chat_id = 0; + int64 direct_messages_chat_id = 0; object_ptr location; object_ptr status; bool is_supergroup = false;