aboutsummaryrefslogtreecommitdiffhomepage
path: root/td/telegram/DisallowedGiftsSettings.cpp
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2025-06-12 23:44:30 +0300
committerlevlam <levlam@telegram.org>2025-06-12 23:44:30 +0300
commitc229e34bda67adbfcb8722b23296c962e7e15bab (patch)
tree1c43dd764aa7b4f7eaaac1d78562f706a3ab448c /td/telegram/DisallowedGiftsSettings.cpp
parent20e241a1a49f521b1eb714f83bd53c4b9247d0d5 (diff)
Ignore gift settings for deleted users.
Diffstat (limited to 'td/telegram/DisallowedGiftsSettings.cpp')
-rw-r--r--td/telegram/DisallowedGiftsSettings.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/td/telegram/DisallowedGiftsSettings.cpp b/td/telegram/DisallowedGiftsSettings.cpp
index c9781dab4..fd9815f57 100644
--- a/td/telegram/DisallowedGiftsSettings.cpp
+++ b/td/telegram/DisallowedGiftsSettings.cpp
@@ -27,6 +27,15 @@ DisallowedGiftsSettings::DisallowedGiftsSettings(const td_api::object_ptr<td_api
}
}
+DisallowedGiftsSettings DisallowedGiftsSettings::allow_nothing() {
+ DisallowedGiftsSettings result;
+ result.disallow_unlimited_stargifts_ = true;
+ result.disallow_limited_stargifts_ = true;
+ result.disallow_unique_stargifts_ = true;
+ result.disallow_premium_gifts_ = true;
+ return result;
+}
+
td_api::object_ptr<td_api::acceptedGiftTypes> DisallowedGiftsSettings::get_accepted_gift_types_object() const {
return td_api::make_object<td_api::acceptedGiftTypes>(!disallow_unlimited_stargifts_, !disallow_limited_stargifts_,
!disallow_unique_stargifts_, !disallow_premium_gifts_);