1
0
Fork 0

API: We can now display polls

This commit is contained in:
Michael 2022-04-22 19:24:22 +00:00
commit 9b646dad97
10 changed files with 245 additions and 7 deletions

View file

@ -97,7 +97,7 @@ class Status extends BaseDataTransferObject
* @param array $item
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public function __construct(array $item, Account $account, Counts $counts, UserAttributes $userAttributes, bool $sensitive, Application $application, array $mentions, array $tags, Card $card, array $attachments, array $reblog)
public function __construct(array $item, Account $account, Counts $counts, UserAttributes $userAttributes, bool $sensitive, Application $application, array $mentions, array $tags, Card $card, array $attachments, array $reblog, array $poll = null)
{
$this->id = (string)$item['uri-id'];
$this->created_at = DateTimeFormat::utc($item['created'], DateTimeFormat::JSON);
@ -140,7 +140,7 @@ class Status extends BaseDataTransferObject
$this->tags = $tags;
$this->emojis = [];
$this->card = $card->toArray() ?: null;
$this->poll = null;
$this->poll = $poll;
}
/**