mirror of
https://github.com/friendica/friendica
synced 2024-11-17 23:03:41 +00:00
Merge pull request #14501 from annando/issue-14495
Issue 14495: Rich HTML content with embedded pictures
This commit is contained in:
commit
e5991069ed
2 changed files with 8 additions and 3 deletions
|
@ -328,7 +328,7 @@ class Status extends BaseFactory
|
||||||
|
|
||||||
$delivery_data = $uid != $item['uid'] ? null : new FriendicaDeliveryData($item['delivery_queue_count'], $item['delivery_queue_done'], $item['delivery_queue_failed']);
|
$delivery_data = $uid != $item['uid'] ? null : new FriendicaDeliveryData($item['delivery_queue_count'], $item['delivery_queue_done'], $item['delivery_queue_failed']);
|
||||||
$visibility_data = $uid != $item['uid'] ? null : new FriendicaVisibility($this->aclFormatter->expand($item['allow_cid']), $this->aclFormatter->expand($item['deny_cid']), $this->aclFormatter->expand($item['allow_gid']), $this->aclFormatter->expand($item['deny_gid']));
|
$visibility_data = $uid != $item['uid'] ? null : new FriendicaVisibility($this->aclFormatter->expand($item['allow_cid']), $this->aclFormatter->expand($item['deny_cid']), $this->aclFormatter->expand($item['allow_gid']), $this->aclFormatter->expand($item['deny_gid']));
|
||||||
$friendica = new FriendicaExtension($item['title'] ?? '', $item['changed'], $item['commented'], $item['received'], $counts->dislikes, $origin_dislike, $network, $platform, $version, $sitename, $delivery_data, $visibility_data);
|
$friendica = new FriendicaExtension($item['title'] ?? '', $item['changed'], $item['commented'], $item['received'], $counts->dislikes, $origin_dislike, $network, $platform, $version, $sitename, $delivery_data, $visibility_data, BBCode::convertForUriId($item['uri-id'], $item['body'], BBCode::EXTERNAL));
|
||||||
|
|
||||||
return new \Friendica\Object\Api\Mastodon\Status($item, $account, $counts, $userAttributes, $sensitive, $application, $mentions, $tags, $card, $attachments, $in_reply, $reshare, $friendica, $quote, $poll, $emojis);
|
return new \Friendica\Object\Api\Mastodon\Status($item, $account, $counts, $userAttributes, $sensitive, $application, $mentions, $tags, $card, $attachments, $in_reply, $reshare, $friendica, $quote, $poll, $emojis);
|
||||||
}
|
}
|
||||||
|
@ -399,7 +399,7 @@ class Status extends BaseFactory
|
||||||
$attachments = [];
|
$attachments = [];
|
||||||
$in_reply = [];
|
$in_reply = [];
|
||||||
$reshare = [];
|
$reshare = [];
|
||||||
$friendica = new FriendicaExtension('', null, null, null, 0, false, null, null, null, null, null, null);
|
$friendica = new FriendicaExtension('', null, null, null, 0, false, null, null, null, null, null, null, BBCode::convertForUriId($item['uri-id'], $item['body'], BBCode::EXTERNAL));
|
||||||
|
|
||||||
return new \Friendica\Object\Api\Mastodon\Status($item, $account, $counts, $userAttributes, $sensitive, $application, $mentions, $tags, $card, $attachments, $in_reply, $reshare, $friendica);
|
return new \Friendica\Object\Api\Mastodon\Status($item, $account, $counts, $userAttributes, $sensitive, $application, $mentions, $tags, $card, $attachments, $in_reply, $reshare, $friendica);
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,9 @@ class FriendicaExtension extends BaseDataTransferObject
|
||||||
*/
|
*/
|
||||||
protected $visibility;
|
protected $visibility;
|
||||||
|
|
||||||
|
/** @var string|null */
|
||||||
|
protected $content;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a FriendicaExtension object
|
* Creates a FriendicaExtension object
|
||||||
*
|
*
|
||||||
|
@ -86,7 +89,8 @@ class FriendicaExtension extends BaseDataTransferObject
|
||||||
?string $version,
|
?string $version,
|
||||||
?string $sitename,
|
?string $sitename,
|
||||||
?FriendicaDeliveryData $delivery_data,
|
?FriendicaDeliveryData $delivery_data,
|
||||||
?FriendicaVisibility $visibility
|
?FriendicaVisibility $visibility,
|
||||||
|
?string $content
|
||||||
) {
|
) {
|
||||||
$this->title = $title;
|
$this->title = $title;
|
||||||
$this->changed_at = $changed_at ? DateTimeFormat::utc($changed_at, DateTimeFormat::JSON) : null;
|
$this->changed_at = $changed_at ? DateTimeFormat::utc($changed_at, DateTimeFormat::JSON) : null;
|
||||||
|
@ -100,6 +104,7 @@ class FriendicaExtension extends BaseDataTransferObject
|
||||||
$this->version = $version;
|
$this->version = $version;
|
||||||
$this->sitename = $sitename;
|
$this->sitename = $sitename;
|
||||||
$this->visibility = $visibility;
|
$this->visibility = $visibility;
|
||||||
|
$this->content = $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue