mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update CommentController, fix scope bug
This commit is contained in:
parent
eb478ccf76
commit
45ecad2a07
1 changed files with 3 additions and 0 deletions
|
@ -61,6 +61,7 @@ class CommentController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
$reply = DB::transaction(function() use($comment, $status, $profile) {
|
$reply = DB::transaction(function() use($comment, $status, $profile) {
|
||||||
|
$scope = $profile->is_private == true ? 'private' : 'public';
|
||||||
$autolink = Autolink::create()->autolink($comment);
|
$autolink = Autolink::create()->autolink($comment);
|
||||||
$reply = new Status();
|
$reply = new Status();
|
||||||
$reply->profile_id = $profile->id;
|
$reply->profile_id = $profile->id;
|
||||||
|
@ -68,6 +69,8 @@ class CommentController extends Controller
|
||||||
$reply->rendered = $autolink;
|
$reply->rendered = $autolink;
|
||||||
$reply->in_reply_to_id = $status->id;
|
$reply->in_reply_to_id = $status->id;
|
||||||
$reply->in_reply_to_profile_id = $status->profile_id;
|
$reply->in_reply_to_profile_id = $status->profile_id;
|
||||||
|
$reply->scope = $scope;
|
||||||
|
$reply->visibility = $scope;
|
||||||
$reply->save();
|
$reply->save();
|
||||||
|
|
||||||
$status->reply_count++;
|
$status->reply_count++;
|
||||||
|
|
Loading…
Reference in a new issue