Don't suggest userpics to paid-restricted.

This commit is contained in:
John Preston 2025-03-03 13:03:20 +04:00
parent 4121c99f36
commit d1e6150874
3 changed files with 5 additions and 3 deletions

View file

@ -1078,7 +1078,9 @@ void BackgroundPreviewBox::updateServiceBg(const std::vector<QColor> &bg) {
? tr::lng_background_other_group(tr::now)
: forChannel()
? tr::lng_background_other_channel(tr::now)
: (_forPeer && !_fromMessageId)
: (_forPeer
&& !_fromMessageId
&& !_forPeer->starsPerMessageChecked())
? tr::lng_background_other_info(
tr::now,
lt_user,

View file

@ -247,6 +247,7 @@ bool UserpicButton::canSuggestPhoto(not_null<UserData*> user) const {
// Server allows suggesting photos only in non-empty chats.
return !user->isSelf()
&& !user->isBot()
&& !user->starsPerMessageChecked()
&& (user->owner().history(user)->lastServerMessage() != nullptr);
}

View file

@ -1203,8 +1203,7 @@ void Filler::addThemeEdit() {
if (!user || user->isInaccessible()) {
return;
}
if ((user->requiresPremiumToWrite() && !user->session().premium())
|| user->starsPerMessage() > 0) {
if (user->requiresPremiumToWrite() && !user->session().premium()) {
return;
}
const auto controller = _controller;