forked from GNUsocial/gnu-social
[ENTITY][Note] Language can be null
This commit is contained in:
parent
4992ff153b
commit
b89f57ce93
@ -168,7 +168,7 @@ class Posting extends Component
|
||||
Actor $actor,
|
||||
string $content,
|
||||
string $content_type,
|
||||
string $language,
|
||||
?string $language = null,
|
||||
array $attachments = [],
|
||||
array $processed_attachments = [],
|
||||
array $process_note_content_extra_args = [],
|
||||
@ -181,7 +181,7 @@ class Posting extends Component
|
||||
'content' => $content,
|
||||
'content_type' => $content_type,
|
||||
'rendered' => $rendered,
|
||||
'language_id' => Language::getByLocale($language)->getId(),
|
||||
'language_id' => !is_null($language) ? Language::getByLocale($language)->getId() : null,
|
||||
'is_local' => true,
|
||||
]);
|
||||
|
||||
|
@ -169,7 +169,7 @@ class Note extends Entity
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLanguageId(): int
|
||||
public function getLanguageId(): ?int
|
||||
{
|
||||
return $this->language_id;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user