]> git.mxchange.org Git - friendica.git/commitdiff
Don't retrieve a contact record we've already been given.
authorvery-ape <git@verya.pe>
Sat, 22 May 2021 05:49:35 +0000 (22:49 -0700)
committervery-ape <git@verya.pe>
Sat, 22 May 2021 05:49:35 +0000 (22:49 -0700)
src/Model/Profile.php

index 0efdb7ae66635ff9cc9c54e1f7deb8c1da9b0f85..e883078f0d2074f65c0ff8e89d2436aba16f09ca 100644 (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'])) {