[COMPONENT][Notification] Support empty array of targets

This commit is contained in:
2021-12-10 04:01:57 +00:00
parent b89f57ce93
commit 60d31e097e
2 changed files with 3 additions and 2 deletions

View File

@@ -350,7 +350,7 @@ class Note extends Entity
{
$rendered = null;
$mentions = [];
Event::handle('RenderNoteContent', [$this->getContent(), $this->getContentType(), &$rendered, &$mentions, $this->getActor(), Language::getById($this->getLanguageId())->getLocale()]);
Event::handle('RenderNoteContent', [$this->getContent(), $this->getContentType(), &$rendered, $this->getActor(), Language::getById($this->getLanguageId())->getLocale(), &$mentions]);
$mentioned = [];
foreach ($mentions as $mention) {
foreach ($mention['mentioned'] as $m) {