From 45ecad2a070b6306a9624219ad3483a9f4266975 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 27 Nov 2019 19:57:23 -0700 Subject: [PATCH] Update CommentController, fix scope bug --- app/Http/Controllers/CommentController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Http/Controllers/CommentController.php b/app/Http/Controllers/CommentController.php index 38c17756..ec8fb920 100644 --- a/app/Http/Controllers/CommentController.php +++ b/app/Http/Controllers/CommentController.php @@ -61,6 +61,7 @@ class CommentController extends Controller } $reply = DB::transaction(function() use($comment, $status, $profile) { + $scope = $profile->is_private == true ? 'private' : 'public'; $autolink = Autolink::create()->autolink($comment); $reply = new Status(); $reply->profile_id = $profile->id; @@ -68,6 +69,8 @@ class CommentController extends Controller $reply->rendered = $autolink; $reply->in_reply_to_id = $status->id; $reply->in_reply_to_profile_id = $status->profile_id; + $reply->scope = $scope; + $reply->visibility = $scope; $reply->save(); $status->reply_count++;