mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Don't suggest userpics to paid-restricted.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user