From: Michael Date: Sat, 19 Sep 2020 20:47:05 +0000 (+0000) Subject: Issue 9229: Show unfollow with known contacts X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bf2ca5fcf952e290e8507b29afaa1c9645909e5a;p=friendica.git Issue 9229: Show unfollow with known contacts --- diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 0ed393022b..a5ea6c4cb6 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -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]) diff --git a/src/Module/Contact.php b/src/Module/Contact.php index 03d67aa089..659380fbef 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -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']);