2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Added initial box for premium gifts.

This commit is contained in:
23rd
2022-07-03 17:56:12 +03:00
committed by John Preston
parent 2a3d72ad2e
commit c7c8ebed13
14 changed files with 407 additions and 5 deletions

View File

@@ -51,6 +51,7 @@ enum class UserDataFlag {
DiscardMinPhoto = (1 << 12),
Self = (1 << 13),
Premium = (1 << 14),
CanReceiveGifts = (1 << 15),
};
inline constexpr bool is_flag_type(UserDataFlag) { return true; };
using UserDataFlags = base::flags<UserDataFlag>;
@@ -106,6 +107,8 @@ public:
[[nodiscard]] bool canShareThisContact() const;
[[nodiscard]] bool canAddContact() const;
[[nodiscard]] bool canReceiveGifts() const;
// In Data::Session::processUsers() we check only that.
// When actually trying to share contact we perform
// a full check by canShareThisContact() call.