Allow deleting replies when comments are deleted.

This commit is contained in:
3m1n3nc3
2024-07-09 04:44:30 +01:00
parent d5a15036b8
commit e9663034fe
8 changed files with 154 additions and 8 deletions
+1 -2
View File
@@ -43,7 +43,7 @@ trait HasComments
$comment = new $commentClass([
'comment' => $comment,
'is_approved' => ($user instanceof Commentator) ? ! $user->needsCommentApproval($this) : false,
'is_approved' => ($user instanceof Commentator) ? !$user->needsCommentApproval($this) : false,
'user_id' => is_null($user) ? null : $user->getKey(),
'commentable_id' => $this->getKey(),
'commentable_type' => get_class(),
@@ -51,5 +51,4 @@ trait HasComments
return $this->comments()->save($comment);
}
}