2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Update API scheme on layer 201.

This commit is contained in:
John Preston
2025-03-18 12:24:03 +04:00
parent 4fc026b13c
commit e3c3a68566
4 changed files with 26 additions and 22 deletions

View File

@@ -823,7 +823,7 @@ void ApplyUserUpdate(not_null<UserData*> user, const MTPDuserFull &update) {
user->setBotVerifyDetails(
ParseBotVerifyDetails(update.vbot_verification()));
if (const auto gifts = update.vdisallowed_stargifts()) {
if (const auto gifts = update.vdisallowed_gifts()) {
const auto &data = gifts->data();
user->setDisallowedGiftTypes(Api::DisallowedGiftType()
| ((data.is_disallow_unlimited_stargifts()
@@ -834,6 +834,9 @@ void ApplyUserUpdate(not_null<UserData*> user, const MTPDuserFull &update) {
: Api::DisallowedGiftType()))
| ((data.is_disallow_unique_stargifts()
? Api::DisallowedGiftType::Unique
: Api::DisallowedGiftType()))
| ((data.is_disallow_premium_gifts()
? Api::DisallowedGiftType::Premium
: Api::DisallowedGiftType())));
} else {
user->setDisallowedGiftTypes(Api::DisallowedGiftTypes());