Skip to content

Commit

Permalink
fix: empty suspension message uses email template expecting one (#3433)
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 authored May 26, 2022
1 parent eb4bac3 commit 29362ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions extensions/suspend/locale/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion extensions/suspend/views/emails/suspended.blade.php
Original file line number Diff line number Diff line change
@@ -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'),
]) !!}

0 comments on commit 29362ed

Please sign in to comment.