diff --git a/extensions/mentions/src/Extension.php b/extensions/mentions/src/Extension.php index 0103a48bc..270ed6ca6 100644 --- a/extensions/mentions/src/Extension.php +++ b/extensions/mentions/src/Extension.php @@ -7,6 +7,8 @@ class Extension extends BaseExtension { public function boot(Dispatcher $events) { + $this->loadViewsFrom(__DIR__.'/../views', 'mentions'); + $events->subscribe('Flarum\Mentions\Listeners\AddClientAssets'); $events->subscribe('Flarum\Mentions\Listeners\AddModelRelationships'); $events->subscribe('Flarum\Mentions\Listeners\AddApiRelationships'); diff --git a/extensions/mentions/views/emails/postMentioned.blade.php b/extensions/mentions/views/emails/postMentioned.blade.php index 7cb719337..b4793ddc5 100644 --- a/extensions/mentions/views/emails/postMentioned.blade.php +++ b/extensions/mentions/views/emails/postMentioned.blade.php @@ -1,9 +1,9 @@ Hey {{ $user->username }}! -{{ $notification->sender->username }} replied to your post (#{{ $notification->post->number }}) in {{ $notification->post->discussion->title }}. +{{ $blueprint->sender->username }} replied to your post (#{{ $blueprint->post->number }}) in {{ $blueprint->post->discussion->title }}. -{{ \Flarum\Core::config('base_url') }}/d/{{ $notification->reply->discussion_id }}/-/{{ $notification->reply->number }} +{{ \Flarum\Core::config('base_url') }}/d/{{ $blueprint->reply->discussion_id }}/-/{{ $blueprint->reply->number }} --- -{{ strip_tags($notification->post->contentHtml) }} +{{ strip_tags($blueprint->post->contentHtml) }} diff --git a/extensions/mentions/views/emails/userMentioned.blade.php b/extensions/mentions/views/emails/userMentioned.blade.php index 4f7d0e33a..e131a4c85 100644 --- a/extensions/mentions/views/emails/userMentioned.blade.php +++ b/extensions/mentions/views/emails/userMentioned.blade.php @@ -1,9 +1,9 @@ Hey {{ $user->username }}! -{{ $notification->post->user->username }} mentioned you in a post in {{ $notification->post->discussion->title }}. +{{ $blueprint->post->user->username }} mentioned you in a post in {{ $blueprint->post->discussion->title }}. -{{ \Flarum\Core::config('base_url') }}/d/{{ $notification->post->discussion_id }}/-/{{ $notification->post->number }} +{{ \Flarum\Core::config('base_url') }}/d/{{ $blueprint->post->discussion_id }}/-/{{ $blueprint->post->number }} --- -{{ strip_tags($notification->post->contentHtml) }} +{{ strip_tags($blueprint->post->contentHtml) }}