Merge pull request #9357 from MrPetovan/bug/9315-follow-link-local-profiles

Update wrong assertion regarding a profile being local user's self in Model\Profile
This commit is contained in:
Michael Vogel 2020-10-04 05:47:04 +02:00 committed by GitHub
commit 6708552b5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 = $profile['self'] ?? false;
$local_user_is_self = self::getMyURL() && ($profile['url'] == self::getMyURL());
$visitor_is_authenticated = (bool)self::getMyURL();
$visitor_is_following =
in_array($visitor_contact['rel'] ?? 0, [Contact::FOLLOWER, Contact::FRIEND])