[ENTITY][Note] Language in notes is optional
This commit is contained in:
parent
1d09a02ad6
commit
93fa7eb0b5
|
@ -350,7 +350,12 @@ class Note extends Entity
|
||||||
{
|
{
|
||||||
$rendered = null;
|
$rendered = null;
|
||||||
$mentions = [];
|
$mentions = [];
|
||||||
Event::handle('RenderNoteContent', [$this->getContent(), $this->getContentType(), &$rendered, $this->getActor(), Language::getById($this->getLanguageId())->getLocale(), &$mentions]);
|
Event::handle('RenderNoteContent', [$this->getContent(),
|
||||||
|
$this->getContentType(),
|
||||||
|
&$rendered,
|
||||||
|
$this->getActor(),
|
||||||
|
is_null($this->getLanguageId()) ? null : Language::getById($this->getLanguageId())->getLocale(),
|
||||||
|
&$mentions]);
|
||||||
$mentioned = [];
|
$mentioned = [];
|
||||||
foreach ($mentions as $mention) {
|
foreach ($mentions as $mention) {
|
||||||
foreach ($mention['mentioned'] as $m) {
|
foreach ($mention['mentioned'] as $m) {
|
||||||
|
|
Loading…
Reference in New Issue