2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Show "premium required" information in chat.

This commit is contained in:
John Preston
2024-01-11 23:20:36 +04:00
parent c765bee0cd
commit e5cda0e2b1
27 changed files with 566 additions and 200 deletions

View File

@@ -520,6 +520,7 @@ not_null<UserData*> Session::processUser(const MTPUser &data) {
| Flag::Premium
| Flag::Support
| Flag::SomeRequirePremiumToWrite
| Flag::MeRequiresPremiumToWrite AssertIsDebug()
| Flag::RequirePremiumToWriteKnown
| (!minimal
? Flag::Contact
@@ -542,7 +543,7 @@ not_null<UserData*> Session::processUser(const MTPUser &data) {
| (data.is_premium() ? Flag::Premium : Flag())
| (data.is_support() ? Flag::Support : Flag())
| (data.is_contact_require_premium()
? (Flag::SomeRequirePremiumToWrite
? ((Flag::SomeRequirePremiumToWrite | Flag::MeRequiresPremiumToWrite) AssertIsDebug()
| (result->someRequirePremiumToWrite()
? (result->requirePremiumToWriteKnown()
? Flag::RequirePremiumToWriteKnown