mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-04 00:25:17 +00:00
Don't show "Report" for personal contact photos.
This commit is contained in:
@@ -1036,13 +1036,18 @@ void OverlayWidget::fillContextMenuActions(const MenuCallback &addAction) {
|
|||||||
}, &st::mediaMenuIconProfile);
|
}, &st::mediaMenuIconProfile);
|
||||||
}();
|
}();
|
||||||
[&] { // Report userpic.
|
[&] { // Report userpic.
|
||||||
if (!_peer || !_photo ) {
|
if (!_peer || !_photo) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
using Type = SharedMediaType;
|
using Type = SharedMediaType;
|
||||||
if (userPhotosKey()) {
|
if (userPhotosKey()) {
|
||||||
if (_peer->isSelf() || _peer->isNotificationsUser()) {
|
if (_peer->isSelf() || _peer->isNotificationsUser()) {
|
||||||
return;
|
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)
|
} else if ((sharedMediaType().value_or(Type::File) == Type::ChatPhoto)
|
||||||
|| (_peer->userpicPhotoId() == _photo->id)) {
|
|| (_peer->userpicPhotoId() == _photo->id)) {
|
||||||
|
Reference in New Issue
Block a user