From 7575257ca638a3927d437166b6ec63daf7eb1130 Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 20 Dec 2023 16:09:15 +0300 Subject: [PATCH] Add fields chat.profile_accent_color_id and chat.profile_background_custom_emoji_id. --- telegram-bot-api/Client.cpp | 10 ++++++++++ telegram-bot-api/Client.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index d0f0566..fb386b8 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -1011,6 +1011,12 @@ class Client::JsonChat final : public td::Jsonable { if (chat_info->background_custom_emoji_id != 0) { object("background_custom_emoji_id", td::to_string(chat_info->background_custom_emoji_id)); } + if (chat_info->profile_accent_color_id != -1) { + object("profile_accent_color_id", chat_info->profile_accent_color_id); + } + if (chat_info->profile_background_custom_emoji_id != 0) { + object("profile_background_custom_emoji_id", td::to_string(chat_info->profile_background_custom_emoji_id)); + } if (chat_info->has_protected_content) { object("has_protected_content", td::JsonTrue()); } @@ -6557,6 +6563,8 @@ void Client::on_update(object_ptr result) { } chat_info->accent_color_id = chat->accent_color_id_; chat_info->background_custom_emoji_id = chat->background_custom_emoji_id_; + chat_info->profile_accent_color_id = chat->profile_accent_color_id_; + chat_info->profile_background_custom_emoji_id = chat->profile_background_custom_emoji_id_; chat_info->has_protected_content = chat->has_protected_content_; break; } @@ -6606,6 +6614,8 @@ void Client::on_update(object_ptr result) { CHECK(chat_info->type != ChatInfo::Type::Unknown); chat_info->accent_color_id = update->accent_color_id_; chat_info->background_custom_emoji_id = update->background_custom_emoji_id_; + chat_info->profile_accent_color_id = update->profile_accent_color_id_; + chat_info->profile_background_custom_emoji_id = update->profile_background_custom_emoji_id_; break; } case td_api::updateChatHasProtectedContent::ID: { diff --git a/telegram-bot-api/Client.h b/telegram-bot-api/Client.h index 25bdcb2..2ae577d 100644 --- a/telegram-bot-api/Client.h +++ b/telegram-bot-api/Client.h @@ -940,7 +940,9 @@ class Client final : public WebhookActor::Callback { td::string title; int32 message_auto_delete_time = 0; int32 accent_color_id = -1; + int32 profile_accent_color_id = -1; int64 background_custom_emoji_id = 0; + int64 profile_background_custom_emoji_id = 0; bool has_protected_content = false; object_ptr available_reactions; object_ptr photo_info;