Skip to content

Commit

Permalink
Add new method to DiscussionRenamedBlueprint
Browse files Browse the repository at this point in the history
  • Loading branch information
franzliedke committed Mar 27, 2020
1 parent 1320b6d commit c900c36
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Notification/Blueprint/DiscussionRenamedBlueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@ public function getData()
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}
*/
Expand Down

0 comments on commit c900c36

Please sign in to comment.