2
0
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:
John Preston
2024-01-02 00:12:51 +04:00
parent a4d7309209
commit 5e255e56eb
4 changed files with 9 additions and 3 deletions

View File

@@ -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();
}