]> BookStack Code Mirror - bookstack/blobdiff - app/Actions/CommentRepo.php
Removed use of book_id in activity
[bookstack] / app / Actions / CommentRepo.php
index c0f008137c87bac251ea8f8637c3cea68e302161..1d46e781cacb4a51aabca5fe5a18fd893d1a3680 100644 (file)
@@ -2,6 +2,7 @@
 
 use BookStack\Entities\Entity;
 use League\CommonMark\CommonMarkConverter;
+use BookStack\Facades\Activity as ActivityService;
 
 /**
  * Class CommentRepo
@@ -44,7 +45,7 @@ class CommentRepo
         $comment->parent_id = $parent_id;
 
         $entity->comments()->save($comment);
-        Activity::add($entity, ActivityType::COMMENTED_ON, $entity->book->id);
+        ActivityService::addForEntity($entity, ActivityType::COMMENTED_ON);
         return $comment;
     }