Don't suggest userpic photos to bots.

This commit is contained in:
John Preston 2023-04-22 22:38:43 +04:00
parent a25005483a
commit 67fa4372aa
1 changed files with 1 additions and 0 deletions

View File

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