From 4fb3d1fa70998a69f219709de2b661a383922b90 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 27 Jul 2021 00:27:36 -0600 Subject: [PATCH] Update status.reply view, fix archived post leakage --- resources/views/status/reply.blade.php | 49 +++++++++++++++++--------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/resources/views/status/reply.blade.php b/resources/views/status/reply.blade.php index dee2e360c..7bd11b7b2 100644 --- a/resources/views/status/reply.blade.php +++ b/resources/views/status/reply.blade.php @@ -5,60 +5,74 @@
- @if($status->parent()->parent()) + @php($gp = $status->parent()->parent()) + @if($gp)
+ @if($gp->scope == 'archived') +

This status cannot be viewed at this time.

+ @else
- @if($status->parent()->parent()->media()->count()) - + @if($gp->media()->count()) + @endif
- +
- {{$status->parent()->parent()->profile->username}} + {{$gp->profile->username}}
-

{!!$status->parent()->parent()->rendered!!}

+

{!!$gp->rendered!!}

- +
+ @endif
@endif + + @php($parent = $status->parent())
+ + @if($parent->scope == 'archived') +

This status cannot be viewed at this time.

+ @else
- @if($status->parent()->media()->count()) - + @if($parent->media()->count()) + @endif
- +
- {{$status->parent()->profile->username}} + {{$parent->profile->username}}
-

{!!$status->parent()->rendered!!}

+

{!!$parent->rendered!!}

- +
+ @endif
+ +
@if($status->is_nsfw)
@@ -101,6 +115,7 @@
@endif
+ @if($status->comments->count())