API: Media attachments are now supported
This commit is contained in:
parent
42d246ef73
commit
e6030e5f82
5 changed files with 195 additions and 5 deletions
|
@ -82,9 +82,11 @@ class Status extends BaseFactory
|
|||
$mentions = DI::mstdnMention()->createFromUriId($uriId);
|
||||
$tags = DI::mstdnTag()->createFromUriId($uriId);
|
||||
|
||||
$attachment = BBCode::getAttachmentData($item['body']);
|
||||
$card = new \Friendica\Object\Api\Mastodon\Card($attachment);
|
||||
$data = BBCode::getAttachmentData($item['body']);
|
||||
$card = new \Friendica\Object\Api\Mastodon\Card($data);
|
||||
|
||||
return new \Friendica\Object\Api\Mastodon\Status($item, $account, $counts, $userAttributes, $sensitive, $application, $mentions, $tags, $card);
|
||||
$attachments = DI::mstdnAttachment()->createFromUriId($uriId);
|
||||
|
||||
return new \Friendica\Object\Api\Mastodon\Status($item, $account, $counts, $userAttributes, $sensitive, $application, $mentions, $tags, $card, $attachments);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue