<?php namespace BookStack\Actions;
-use BookStack\Entities\Entity;
+use BookStack\Entities\Models\Entity;
use League\CommonMark\CommonMarkConverter;
+use BookStack\Facades\Activity as ActivityService;
/**
* Class CommentRepo
$comment->parent_id = $parent_id;
$entity->comments()->save($comment);
+ ActivityService::addForEntity($entity, ActivityType::COMMENTED_ON);
return $comment;
}
/**
* Convert the given comment markdown text to HTML.
*/
- protected function commentToHtml(string $commentText): string
+ public function commentToHtml(string $commentText): string
{
$converter = new CommonMarkConverter([
'html_input' => 'strip',