fix: empty suspension message uses email template expecting one (#3433)

This commit is contained in:
Sami Mazouz 2022-05-26 18:52:19 +01:00 committed by GitHub
parent eb4bac3b8f
commit 29362ed924
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -49,6 +49,7 @@ flarum-suspend:
# Translations in this namespace are used by suspension email notifications
email:
no_reason_given: No reason was given for this suspension.
suspended:
subject: Your account has been suspended
body: |

View File

@ -1,4 +1,4 @@
{!! $translator->trans('flarum-suspend.email.suspended.body', [
'{recipient_display_name}' => $user->display_name,
'{suspension_message}' => $blueprint->user->suspend_message,
'{suspension_message}' => $blueprint->user->suspend_message ?? $translator->trans('flarum-suspend.email.no_reason_given'),
]) !!}