]> git.mxchange.org Git - friendica.git/commitdiff
Issue 9229: Show unfollow with known contacts
authorMichael <heluecht@pirati.ca>
Sat, 19 Sep 2020 20:47:05 +0000 (20:47 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 19 Sep 2020 20:47:05 +0000 (20:47 +0000)
src/Model/Profile.php
src/Module/Contact.php

index 0ed393022b3f7ea108c6ca40d03fcfe1949990a0..a5ea6c4cb6e029e1bf299ebd5537f77757848a5a 100644 (file)
@@ -304,7 +304,7 @@ class Profile
 
                $profile_is_dfrn = $profile['network'] == Protocol::DFRN;
                $profile_is_native = in_array($profile['network'], Protocol::NATIVE_SUPPORT);
-               $local_user_is_self = local_user() && local_user() == ($profile['uid'] ?? 0);
+               $local_user_is_self = $profile['self'] ?? false;
                $visitor_is_authenticated = (bool)self::getMyURL();
                $visitor_is_following =
                        in_array($visitor_contact['rel'] ?? 0, [Contact::FOLLOWER, Contact::FRIEND])
index 03d67aa08944a5772451d2a973f55e092f0f5f4e..659380fbef3ba7bf3a08197bc923ff038fcdf2de 100644 (file)
@@ -952,7 +952,7 @@ class Contact extends BaseModule
                if (DBA::isResult($contact)) {
                        DI::page()['aside'] = '';
 
-                       $profiledata = Model\Contact::getByURL($contact['url'], false);
+                       $profiledata = Model\Contact::getByURLForUser($contact['url'], local_user());
 
                        Model\Profile::load($a, '', $profiledata, true);
 
@@ -975,7 +975,7 @@ class Contact extends BaseModule
                if (DBA::isResult($contact)) {
                        DI::page()['aside'] = '';
 
-                       $profiledata = Model\Contact::getByURL($contact['url'], false);
+                       $profiledata = Model\Contact::getByURLForUser($contact['url'], local_user());
 
                        if (local_user() && in_array($profiledata['network'], Protocol::FEDERATED)) {
                                $profiledata['remoteconnect'] = DI::baseUrl() . '/follow?url=' . urlencode($profiledata['url']);