From 8a32284320de6e8312867047abb20ea2a96c980c Mon Sep 17 00:00:00 2001 From: Ian Morland Date: Mon, 21 Dec 2020 09:32:39 +0000 Subject: [PATCH] Fix incorrect display_name showing in email notifications --- src/Notification/PostMentionedBlueprint.php | 2 +- views/emails/postMentioned.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Notification/PostMentionedBlueprint.php b/src/Notification/PostMentionedBlueprint.php index e8038a5..eda26d8 100644 --- a/src/Notification/PostMentionedBlueprint.php +++ b/src/Notification/PostMentionedBlueprint.php @@ -74,7 +74,7 @@ public function getEmailView() public function getEmailSubject(TranslatorInterface $translator) { return $translator->trans('flarum-mentions.email.post_mentioned.subject', [ - '{replier_display_name}' => $this->post->user->display_name, + '{replier_display_name}' => $this->reply->user->display_name, '{title}' => $this->post->discussion->title ]); } diff --git a/views/emails/postMentioned.blade.php b/views/emails/postMentioned.blade.php index 052a016..73ce3d7 100644 --- a/views/emails/postMentioned.blade.php +++ b/views/emails/postMentioned.blade.php @@ -1,6 +1,6 @@ {!! $translator->trans('flarum-mentions.email.post_mentioned.body', [ '{recipient_display_name}' => $user->display_name, -'{replier_display_name}' => $blueprint->post->user->display_name, +'{replier_display_name}' => $blueprint->reply->user->display_name, '{post_number}' => $blueprint->post->number, '{title}' => $blueprint->post->discussion->title, '{url}' => $url->to('forum')->route('discussion', ['id' => $blueprint->reply->discussion_id, 'near' => $blueprint->reply->number]),