From ddfab824c35c67ea55428632f607eca376ea4b57 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 23 Apr 2025 14:06:50 +0400 Subject: [PATCH] Respect gift privacy for resell gifts. --- Telegram/SourceFiles/boxes/star_gift_box.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/boxes/star_gift_box.cpp b/Telegram/SourceFiles/boxes/star_gift_box.cpp index e56f8b028c..18bdebceb6 100644 --- a/Telegram/SourceFiles/boxes/star_gift_box.cpp +++ b/Telegram/SourceFiles/boxes/star_gift_box.cpp @@ -931,7 +931,9 @@ void PreviewWrap::paintEvent(QPaintEvent *e) { const auto allowLimited = !(disallowedTypes & Type::Limited); const auto allowUnlimited = !(disallowedTypes & Type::Unlimited); const auto allowUnique = !(disallowedTypes & Type::Unique); - if (!gift.info.limitedCount) { + if (gift.resale) { + return allowUnique; + } else if (!gift.info.limitedCount) { return allowUnlimited; } return allowLimited || (gift.info.starsToUpgrade && allowUnique); @@ -1525,7 +1527,7 @@ struct GiftPriceTabs { } else { hasNonSoldOut = true; } - if (gift.info.starsResellMin) { + if (gift.resale) { hasResale = true; } else { hasNonResale = true;