From 119662f6cee95cea11a72703203502ff4e67527e Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Fri, 27 Mar 2020 15:53:24 +0100 Subject: [PATCH] Add new method to DiscussionRenamedBlueprint --- .../Blueprint/DiscussionRenamedBlueprint.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/framework/core/src/Notification/Blueprint/DiscussionRenamedBlueprint.php b/framework/core/src/Notification/Blueprint/DiscussionRenamedBlueprint.php index 181d298ad..7e569490a 100644 --- a/framework/core/src/Notification/Blueprint/DiscussionRenamedBlueprint.php +++ b/framework/core/src/Notification/Blueprint/DiscussionRenamedBlueprint.php @@ -51,6 +51,19 @@ class DiscussionRenamedBlueprint implements BlueprintInterface return ['postNumber' => (int) $this->post->number]; } + /** + * {@inheritdoc} + */ + public function getAttributes(): array + { + return [ + 'type' => static::getType(), + 'from_user_id' => $this->post->user ? $this->post->user->id : null, + 'subject_id' => $this->post->discussion ? $this->post->discussion->id : null, + 'data' => json_encode(['postNumber' => (int) $this->post->number]), + ]; + } + /** * {@inheritdoc} */