mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Don't allow gifting premium if can't buy.
This commit is contained in:
@@ -240,7 +240,7 @@ bool Session::premium() const {
|
||||
}
|
||||
|
||||
bool Session::premiumPossible() const {
|
||||
return premium() || _premiumPossible.current();
|
||||
return premium() || premiumCanBuy();
|
||||
}
|
||||
|
||||
bool Session::premiumBadgesShown() const {
|
||||
@@ -262,6 +262,10 @@ rpl::producer<bool> Session::premiumPossibleValue() const {
|
||||
_1 || _2);
|
||||
}
|
||||
|
||||
bool Session::premiumCanBuy() const {
|
||||
return _premiumPossible.current();
|
||||
}
|
||||
|
||||
bool Session::isTestMode() const {
|
||||
return mtp().isTestMode();
|
||||
}
|
||||
|
Reference in New Issue
Block a user