2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Edit paid messages exceptions.

This commit is contained in:
John Preston
2025-02-26 17:24:07 +04:00
parent 1684465e04
commit c6fd8bcb99
11 changed files with 184 additions and 48 deletions

View File

@@ -869,15 +869,11 @@ int ChannelData::starsPerMessage() const {
}
void ChannelData::setStarsPerMessage(int stars) {
if (!mgInfo || starsPerMessage() == stars) {
return;
}
const auto removed = mgInfo->_starsPerMessage && !stars;
mgInfo->_starsPerMessage = stars;
session().changes().peerUpdated(this, UpdateFlag::StarsPerMessage);
if (removed) {
session().local().clearPeerTrusted(id);
if (mgInfo && starsPerMessage() != stars) {
mgInfo->_starsPerMessage = stars;
session().changes().peerUpdated(this, UpdateFlag::StarsPerMessage);
}
checkTrustedPayForMessage();
}
int ChannelData::peerGiftsCount() const {