@php $actor_url = ""; $display_post = null; if ($post instanceof App\Models\Note) $display_post = $post; else if ($post instanceof App\Models\Announcement) { $booster = $post->actor ()->first (); $display_post = $post->note ()->first (); } $actor = $display_post->get_actor ()->first (); if (!$actor) { // TODO: Check why this happens return; } if ($actor->user_id) $actor_url = route ('users.show', [ 'user_name' => $actor->user->name ]); else $actor_url = route ('users.show', [ 'user_name' => $actor->local_actor_id ]); @endphp

{{ $actor->name }}

@if ($actor->user) @else @endif

@if ($display_post->in_reply_to && $display_post->get_parent ()->first ()) In response to this post
@endif @if ($post instanceof App\Models\Announcement) {{ $booster->name }} Boosted
@endif

{{ $display_post->summary }}

{!! $display_post->content !!}

@foreach ($display_post->attachments as $attachment) @endforeach


@if ($display_post->get_replies ()->count () > 0)
@foreach ($display_post->get_replies ()->get () as $reply)

{{ $reply->summary }}

{!! $reply->content !!}

@foreach ($reply->attachments as $attachment) @endforeach

by {{ $reply->get_actor ()->first ()->name }} ;

@endforeach
@endif @if ($display_post->get_hashtags ()->count () > 0)

Tags: @foreach ($display_post->get_hashtags ()->get () as $hashtag) {{ $hashtag->name }} @endforeach

@endif

Likes: {{ $display_post->get_likes ()->count () }}

Replies: {{ $display_post->get_replies ()->count () }}

Boosts: {{ $display_post->get_boosts ()->count () }}

{{-- @if ($actor->user && auth ()->check () && auth ()->user ()->is ($actor->user))
@csrf
@endif --}}