id = $contact['id']; $relationship->following = in_array($contact['rel'], [Contact::SHARING, Contact::FRIEND]); $relationship->followed_by = in_array($contact['rel'], [Contact::FOLLOWER, Contact::FRIEND]); $relationship->blocking = (bool)$contact['blocked']; $relationship->muting = (bool)$contact['readonly']; $relationship->muting_notifications = (bool)$contact['readonly']; $relationship->requested = (bool)$contact['pending']; $relationship->domain_blocking = Network::isUrlBlocked($contact['url']); // Unsupported $relationship->showing_reblogs = true; // Unsupported $relationship->endorsed = false; return $relationship; } }