2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 23:15:59 +00:00

Update API scheme, new paid.

This commit is contained in:
John Preston
2025-02-18 19:50:55 +04:00
parent 852ab19760
commit 960cf7a34b
22 changed files with 302 additions and 290 deletions

View File

@@ -1459,38 +1459,13 @@ int PeerData::starsPerMessage() const {
return 0;
}
int PeerData::starsForMessageLocked() const {
if (const auto user = asUser()) {
return user->starsForMessageLocked();
} else if (const auto channel = asChannel()) {
return channel->starsForMessageLocked();
}
return 0;
}
void PeerData::lockStarsForMessage() {
if (const auto user = asUser()) {
user->lockStarsForMessage();
} else if (const auto channel = asChannel()) {
channel->lockStarsForMessage();
}
}
int PeerData::commitStarsForMessage() {
if (const auto user = asUser()) {
return user->commitStarsForMessage();
} else if (const auto channel = asChannel()) {
return channel->commitStarsForMessage();
}
return 0;
}
void PeerData::cancelStarsForMessage() {
if (const auto user = asUser()) {
user->cancelStarsForMessage();
} else if (const auto channel = asChannel()) {
channel->cancelStarsForMessage();
int PeerData::starsPerMessageChecked() const {
if (const auto channel = asChannel()) {
return (channel->adminRights() || channel->amCreator())
? 0
: channel->starsPerMessage();
}
return starsPerMessage();
}
Data::GroupCall *PeerData::groupCall() const {