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

Fix editing price per message.

This commit is contained in:
John Preston
2025-07-02 12:36:07 +04:00
parent 33671e7737
commit fd24f7045e
6 changed files with 29 additions and 7 deletions

View File

@@ -255,7 +255,7 @@ void SaveStarsPerMessage(
api->clearModifyRequest(key);
api->applyUpdates(result);
if (!broadcast) {
channel->setStarsPerMessage(starsPerMessage);
channel->owner().editStarsPerMessage(channel, starsPerMessage);
}
done(true);
}).fail([=](const MTP::Error &error) {
@@ -265,7 +265,9 @@ void SaveStarsPerMessage(
done(false);
} else {
if (!broadcast) {
channel->setStarsPerMessage(starsPerMessage);
channel->owner().editStarsPerMessage(
channel,
starsPerMessage);
}
done(true);
}
@@ -362,7 +364,7 @@ void ShowEditPermissions(
[[nodiscard]] int CurrentPricePerMessage(ChannelData *monoforumLink) {
return monoforumLink
? monoforumLink->owner().commonStarsPerMessage(monoforumLink)
? monoforumLink->commonStarsPerMessage()
: -1;
}

View File

@@ -1179,7 +1179,7 @@ void ShowEditPeerPermissionsBox(
if (available) {
Ui::AddSkip(inner);
const auto starsPerMessage = peer->isChannel()
? peer->asChannel()->starsPerMessage()
? peer->asChannel()->commonStarsPerMessage()
: 0;
charging = inner->add(object_ptr<Ui::SettingsButton>(
inner,