X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FObject%2FApi%2FMastodon%2FRelationship.php;h=42d0e73119bc315f6efccc7f99adec658ec50127;hb=32bb0976046ef9fa2296d0aeb39a01b0b916dc1e;hp=5d7169b8934d12a4c8bd7ab3ef7d2a87ff13596e;hpb=2b95a7e7cd76c573b82b2dbcc5ad08b1501ee89b;p=friendica.git diff --git a/src/Object/Api/Mastodon/Relationship.php b/src/Object/Api/Mastodon/Relationship.php index 5d7169b893..42d0e73119 100644 --- a/src/Object/Api/Mastodon/Relationship.php +++ b/src/Object/Api/Mastodon/Relationship.php @@ -1,6 +1,6 @@ note = ''; if ($contactRecord['uid'] != 0) { - $this->following = in_array($contactRecord['rel'] ?? 0, [Contact::SHARING, Contact::FRIEND]); + $this->following = !$contactRecord['pending'] && in_array($contactRecord['rel'] ?? 0, [Contact::SHARING, Contact::FRIEND]); $this->requested = (bool)($contactRecord['pending'] ?? false); - $this->followed_by = in_array($contactRecord['rel'] ?? 0, [Contact::FOLLOWER, Contact::FRIEND]); + $this->followed_by = !$contactRecord['pending'] && in_array($contactRecord['rel'] ?? 0, [Contact::FOLLOWER, Contact::FRIEND]); $this->muting = (bool)($contactRecord['readonly'] ?? false) || $muted; $this->notifying = (bool)$contactRecord['notify_new_posts'] ?? false; $this->blocking = (bool)($contactRecord['blocked'] ?? false) || $blocked;