@php $actor_url = ""; $display_post = null; if ($post instanceof App\Models\Note) $display_post = $post; else if ($post instanceof App\Models\Announcement) $display_post = $post->note ()->first (); $actor = $display_post->get_actor ()->first (); 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) In response to this post @endif

{{ $display_post->summary }}

{!! $display_post->content !!}

@foreach ($display_post->attachments as $attachment) {{ $attachment->name }} @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) {{ $attachment->name }} @endforeach

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

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

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

@endif

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

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

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