Don't retrieve a contact record we've already been given.

This commit is contained in:
very-ape 2021-05-21 22:49:35 -07:00
parent c22ef3e79e
commit 34eb81a187
1 changed files with 5 additions and 2 deletions

View File

@ -271,8 +271,11 @@ class Profile
$contact = [];
if ($is_contact) {
$contact_id = Contact::getIdForURL($profile['nurl'], local_user());
$contact = Contact::getById($contact_id);
if (local_user() && ($profile['uid'] ?? '') != local_user()) {
$contact = Contact::getById(Contact::getIdForURL($profile['nurl'], local_user()));
} else {
$contact = $profile;
}
}
if (empty($profile['nickname'])) {