API: Improve support for the summary field

This commit is contained in:
Michael 2022-03-08 18:32:09 +00:00
parent 4b6bbe3632
commit e0468ac914
4 changed files with 8 additions and 5 deletions

View file

@ -107,8 +107,8 @@ class Status extends BaseDataTransferObject
$this->in_reply_to_account_id = (string)$item['parent-author-id'];
}
$this->sensitive = $sensitive;
$this->spoiler_text = $item['title'];
$this->sensitive = $sensitive;
$this->spoiler_text = $item['title'] ?: $item['content-warning'];
$visibility = ['public', 'private', 'unlisted'];
$this->visibility = $visibility[$item['private']];