diff --git a/src/Api/Mastodon/Relationship.php b/src/Api/Mastodon/Relationship.php new file mode 100644 index 000000000..18e249ba3 --- /dev/null +++ b/src/Api/Mastodon/Relationship.php @@ -0,0 +1,59 @@ +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; + } +}