Merge pull request #9244 from annando/issue-9229

Issue 9229: Show unfollow with known contacts
This commit is contained in:
Hypolite Petovan 2020-09-19 22:10:00 -04:00 committed by GitHub
commit b2cf998b78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View 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])

View 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']);