diff --git a/extensions/suspend/src/Notification/UserSuspendedBlueprint.php b/extensions/suspend/src/Notification/UserSuspendedBlueprint.php index b54aa70f99..ea9c6a0424 100644 --- a/extensions/suspend/src/Notification/UserSuspendedBlueprint.php +++ b/extensions/suspend/src/Notification/UserSuspendedBlueprint.php @@ -9,6 +9,7 @@ namespace Flarum\Suspend\Notification; +use Carbon\Carbon; use Carbon\CarbonInterface; use Flarum\Database\AbstractModel; use Flarum\Locale\TranslatorInterface; @@ -35,7 +36,7 @@ public function getFromUser(): ?User public function getData(): CarbonInterface { - return $this->user->suspended_until; + return Carbon::now(); } public static function getType(): string diff --git a/extensions/suspend/views/emails/html/suspended.blade.php b/extensions/suspend/views/emails/html/suspended.blade.php index 13d85e37d2..0cdfffddf2 100644 --- a/extensions/suspend/views/emails/html/suspended.blade.php +++ b/extensions/suspend/views/emails/html/suspended.blade.php @@ -1,12 +1,11 @@ @extends('flarum.forum::email.html.information.base') -@section('content') +@section('informationContent') {!! $formatter->convert($translator->trans('flarum-suspend.email.suspended.html.body', [ -'{recipient_display_name}' => $user->display_name, '{forumTitle}' => $settings->get('forum_title') ])) !!} @endsection @section('contentPreview') - {!! $formatter->convert(($blueprint->user->suspend_message ?? $translator->trans('flarum-suspend.email.no_reason_given'))) !!} + {!! $formatter->convert($blueprint->user->suspend_message ?? $translator->trans('flarum-suspend.email.no_reason_given')) !!} @endsection diff --git a/extensions/suspend/views/emails/plain/suspended.blade.php b/extensions/suspend/views/emails/plain/suspended.blade.php index 85eedf3da6..b752be9cd5 100644 --- a/extensions/suspend/views/emails/plain/suspended.blade.php +++ b/extensions/suspend/views/emails/plain/suspended.blade.php @@ -2,7 +2,6 @@ @section('content') {!! $translator->trans('flarum-suspend.email.suspended.plain.body', [ -'{recipient_display_name}' => $user->display_name, '{suspension_message}' => $blueprint->user->suspend_message ?? $translator->trans('flarum-suspend.email.no_reason_given'), ]) !!} @endsection diff --git a/framework/core/views/email/html/information/base.blade.php b/framework/core/views/email/html/information/base.blade.php index df71fd2883..8267c93482 100644 --- a/framework/core/views/email/html/information/base.blade.php +++ b/framework/core/views/email/html/information/base.blade.php @@ -5,7 +5,11 @@ @endsection @section('content') -
{!! $formatter->convert($infoContent) !!}
+ @if(isset($infoContent)) +{!! $formatter->convert($infoContent) !!}
+ @else + @yield('informationContent') + @endif @hasSection('contentPreview')