]> BookStack Code Mirror - bookstack/blobdiff - app/Activity/Notifications/Handlers/PageCreationNotificationHandler.php
ExportFormatter: Add book description and check for empty book and chapter descriptio...
[bookstack] / app / Activity / Notifications / Handlers / PageCreationNotificationHandler.php
index e9aca2f231fae7509275db3b5ad0935149fc5d5d..2492021e22517f5a87821f3b7d90ffd45d668175 100644 (file)
@@ -2,6 +2,7 @@
 
 namespace BookStack\Activity\Notifications\Handlers;
 
+use BookStack\Activity\Models\Activity;
 use BookStack\Activity\Models\Loggable;
 use BookStack\Activity\Notifications\Messages\PageCreationNotification;
 use BookStack\Activity\Tools\EntityWatchers;
@@ -11,13 +12,13 @@ use BookStack\Users\Models\User;
 
 class PageCreationNotificationHandler extends BaseNotificationHandler
 {
-    public function handle(string $activityType, Loggable|string $detail, User $user): void
+    public function handle(Activity $activity, Loggable|string $detail, User $user): void
     {
         if (!($detail instanceof Page)) {
             throw new \InvalidArgumentException("Detail for page create notifications must be a page");
         }
 
         $watchers = new EntityWatchers($detail, WatchLevels::NEW);
-        $this->sendNotificationToUserIds(PageCreationNotification::class, $watchers->getWatcherUserIds(), $user, $detail);
+        $this->sendNotificationToUserIds(PageCreationNotification::class, $watchers->getWatcherUserIds(), $user, $detail, $detail);
     }
 }