From d419af4b80aedf407bece9b4db814967e0026998 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 2 Feb 2023 02:21:13 -0700 Subject: [PATCH] Update reply view, fix visibility filtering --- resources/views/status/reply.blade.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/resources/views/status/reply.blade.php b/resources/views/status/reply.blade.php index 7bd11b7b2..c8006752c 100644 --- a/resources/views/status/reply.blade.php +++ b/resources/views/status/reply.blade.php @@ -5,10 +5,16 @@
+ @php($authed = request()->user()) + @php($pid = $authed ? request()->user()->profile_id : null) @php($gp = $status->parent()->parent()) @if($gp)
- @if($gp->scope == 'archived') + @if( + !in_array($gp->scope, ['public', 'unlisted', 'private']) || + ($gp->scope == 'private' && !$authed) || + ($gp->scope == 'private' && ($gp->profile_id != $pid && \App\Services\FollowerService::follows($pid, $gp->profile_id) == false)) + )

This status cannot be viewed at this time.

@else
@@ -41,8 +47,11 @@ @php($parent = $status->parent())
- - @if($parent->scope == 'archived') + @if( + !in_array($parent->scope, ['public', 'unlisted', 'private']) || + ($parent->scope == 'private' && !$authed) || + ($parent->scope == 'private' && ($parent->profile_id != $pid && \App\Services\FollowerService::follows($pid, $parent->profile_id) == false)) + )

This status cannot be viewed at this time.

@else