3 namespace BookStack\Activity\Notifications\Messages;
5 use BookStack\Activity\Notifications\LinkedMailMessageLine;
6 use BookStack\Entities\Models\Page;
7 use Illuminate\Notifications\Messages\MailMessage;
9 class PageUpdateNotification extends BaseActivityNotification
11 public function toMail(mixed $notifiable): MailMessage
13 /** @var Page $page */
14 $page = $this->detail;
16 return (new MailMessage())
17 ->subject("Updated Page: " . $page->getShortName())
18 ->line("A page has been updated in " . setting('app-name') . ':')
19 ->line("Page Name: " . $page->name)
20 ->line("Updated By: " . $this->user->name)
21 ->line("To prevent a mass of notifications, for a while you won't be sent notifications for further edits to this page by the same editor.")
22 ->action('View Page', $page->getUrl())
23 ->line(new LinkedMailMessageLine(
24 url('/preferences/notifications'),
25 'This notification was sent to you because :link cover this type of activity for this item.',
26 'your notification preferences',