profile : false; $requested = false; $domainBlocking = false; if ($user) { $requested = FollowRequest::whereFollowerId($user->id) ->whereFollowingId($profile->id) ->exists(); if ($profile->domain) { $domainBlocking = UserDomainBlock::whereProfileId($user->id) ->whereDomain($profile->domain) ->exists(); } } return [ 'id' => (string) $profile->id, 'following' => $auth ? $user->follows($profile) : false, 'followed_by' => $auth ? $user->followedBy($profile) : false, 'blocking' => $auth ? $user->blockedIds()->contains($profile->id) : false, 'muting' => $auth ? $user->mutedIds()->contains($profile->id) : false, 'muting_notifications' => false, 'requested' => $requested, 'domain_blocking' => $domainBlocking, 'showing_reblogs' => false, 'endorsed' => false, ]; } }