From f57e2a496f37f974e8a4097103aa08915c983194 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 21 Mar 2024 14:35:27 +0300 Subject: [PATCH] Add td_api::userPrivacySettingShowBirthdate. --- td/generate/scheme/td_api.tl | 3 +++ td/telegram/UserPrivacySetting.cpp | 9 ++++++++- td/telegram/UserPrivacySetting.h | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 744c0fb08..aa154dd00 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -5570,6 +5570,9 @@ userPrivacySettingShowPhoneNumber = UserPrivacySetting; //@description A privacy setting for managing whether the user's bio is visible userPrivacySettingShowBio = UserPrivacySetting; +//@description A privacy setting for managing whether the user's birthdate is visible +userPrivacySettingShowBirthdate = UserPrivacySetting; + //@description A privacy setting for managing whether the user can be invited to chats userPrivacySettingAllowChatInvites = UserPrivacySetting; diff --git a/td/telegram/UserPrivacySetting.cpp b/td/telegram/UserPrivacySetting.cpp index 1311a552d..c6e2e4a63 100644 --- a/td/telegram/UserPrivacySetting.cpp +++ b/td/telegram/UserPrivacySetting.cpp @@ -49,7 +49,7 @@ UserPrivacySetting::UserPrivacySetting(const telegram_api::PrivacyKey &key) { type_ = Type::UserBio; break; case telegram_api::privacyKeyBirthday::ID: - type_ = Type::UserBio; + type_ = Type::UserBirthdate; break; default: UNREACHABLE(); @@ -79,6 +79,8 @@ td_api::object_ptr UserPrivacySetting::get_user_priv return make_tl_object(); case Type::UserBio: return make_tl_object(); + case Type::UserBirthdate: + return make_tl_object(); default: UNREACHABLE(); return nullptr; @@ -106,6 +108,8 @@ telegram_api::object_ptr UserPrivacySetting::get_ return make_tl_object(); case Type::UserBio: return make_tl_object(); + case Type::UserBirthdate: + return make_tl_object(); default: UNREACHABLE(); return nullptr; @@ -144,6 +148,9 @@ UserPrivacySetting::UserPrivacySetting(const td_api::UserPrivacySetting &key) { case td_api::userPrivacySettingShowBio::ID: type_ = Type::UserBio; break; + case td_api::userPrivacySettingShowBirthdate::ID: + type_ = Type::UserBirthdate; + break; default: UNREACHABLE(); type_ = Type::UserStatus; diff --git a/td/telegram/UserPrivacySetting.h b/td/telegram/UserPrivacySetting.h index 26a50465c..502ff6744 100644 --- a/td/telegram/UserPrivacySetting.h +++ b/td/telegram/UserPrivacySetting.h @@ -27,6 +27,7 @@ class UserPrivacySetting { FindByPhoneNumber, VoiceMessages, UserBio, + UserBirthdate, Size };