id = $userContactId; $this->following = in_array($userContact['rel'] ?? 0, [Contact::SHARING, Contact::FRIEND]); $this->followed_by = in_array($userContact['rel'] ?? 0, [Contact::FOLLOWER, Contact::FRIEND]); $this->blocking = (bool)$userContact['blocked'] ?? false; $this->muting = (bool)$userContact['readonly'] ?? false; $this->muting_notifications = (bool)$userContact['readonly'] ?? false; $this->requested = (bool)$userContact['pending'] ?? false; $this->domain_blocking = Network::isUrlBlocked($userContact['url'] ?? ''); return $this; } }