Fix notification emails

This commit is contained in:
Toby Zerner 2015-07-23 16:40:19 +09:30
parent 0c7bd6e86d
commit b300323fb7
3 changed files with 8 additions and 6 deletions

View File

@ -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');

View File

@ -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) }}

View File

@ -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) }}