From 34eb81a18786dd9b2acef301465a2e4bb47ba2c8 Mon Sep 17 00:00:00 2001 From: very-ape Date: Fri, 21 May 2021 22:49:35 -0700 Subject: [PATCH] Don't retrieve a contact record we've already been given. --- src/Model/Profile.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 0efdb7ae66..e883078f0d 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -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'])) {