mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Show "premium required" information in chat.
This commit is contained in:
@@ -1101,6 +1101,9 @@ Data::RestrictionCheckResult PeerData::amRestricted(
|
||||
}
|
||||
};
|
||||
if (const auto user = asUser()) {
|
||||
if (user->meRequiresPremiumToWrite() && !user->session().premium()) {
|
||||
return Result::Explicit();
|
||||
}
|
||||
return (right == ChatRestriction::SendVoiceMessages
|
||||
|| right == ChatRestriction::SendVideoMessages)
|
||||
? ((user->flags() & UserDataFlag::VoiceMessagesForbidden)
|
||||
|
Reference in New Issue
Block a user