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

Hide reply in notification for paid peers.

This commit is contained in:
John Preston
2025-03-05 10:41:44 +04:00
parent 7b0a156bba
commit 95ccc99fee

View File

@@ -378,6 +378,12 @@ void System::schedule(Data::ItemNotification notification) {
registerThread(thread);
_whenAlerts[thread].emplace(timing.when, notifyBy);
}
if (const auto user = item->history()->peer->asUser()) {
if (user->hasStarsPerMessage()
&& !user->messageMoneyRestrictionsKnown()) {
user->updateFull();
}
}
if (Core::App().settings().desktopNotify()
&& !_manager->skipToast()) {
registerThread(thread);
@@ -944,7 +950,8 @@ Manager::DisplayOptions Manager::getNotificationOptions(
|| (!Data::CanSendTexts(peer)
&& (!topic || !Data::CanSendTexts(topic)))
|| peer->isBroadcast()
|| (peer->slowmodeSecondsLeft() > 0);
|| (peer->slowmodeSecondsLeft() > 0)
|| (peer->starsPerMessageChecked() > 0);
result.spoilerLoginCode = item
&& !item->out()
&& peer->isNotificationsUser()