]> BookStack Code Mirror - bookstack/blobdiff - app/Actions/CommentRepo.php
Code cleanup, bug squashing
[bookstack] / app / Actions / CommentRepo.php
index c0f008137c87bac251ea8f8637c3cea68e302161..13a83e7fdd247064983c64928811b49db2ba4ca1 100644 (file)
@@ -1,7 +1,8 @@
 <?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
@@ -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;
     }