From 95ccc99feef3b43192fb6dbb176b562574b85a4e Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 5 Mar 2025 10:41:44 +0400 Subject: [PATCH] Hide reply in notification for paid peers. --- Telegram/SourceFiles/window/notifications_manager.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/window/notifications_manager.cpp b/Telegram/SourceFiles/window/notifications_manager.cpp index ce39e6fb1..eee26caec 100644 --- a/Telegram/SourceFiles/window/notifications_manager.cpp +++ b/Telegram/SourceFiles/window/notifications_manager.cpp @@ -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()