Don't show "Report" for personal contact photos.

This commit is contained in:
John Preston 2023-01-09 09:20:36 +04:00
parent 23387d6625
commit 2d9d373c7f

View file

@ -1043,6 +1043,11 @@ void OverlayWidget::fillContextMenuActions(const MenuCallback &addAction) {
if (userPhotosKey()) {
if (_peer->isSelf() || _peer->isNotificationsUser()) {
return;
} else if (const auto user = _peer->asUser()) {
if (user->hasPersonalPhoto()
&& user->userpicPhotoId() == _photo->id) {
return;
}
}
} else if ((sharedMediaType().value_or(Type::File) == Type::ChatPhoto)
|| (_peer->userpicPhotoId() == _photo->id)) {