Merge pull request #14501 from annando/issue-14495

Issue 14495: Rich HTML content with embedded pictures
This commit is contained in:
Tobias Diekershoff 2024-10-27 07:25:21 +01:00 committed by GitHub
commit e5991069ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View file

@ -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']);
$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);
}
@ -399,7 +399,7 @@ class Status extends BaseFactory
$attachments = [];
$in_reply = [];
$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);
}

View file

@ -57,6 +57,9 @@ class FriendicaExtension extends BaseDataTransferObject
*/
protected $visibility;
/** @var string|null */
protected $content;
/**
* Creates a FriendicaExtension object
*
@ -86,7 +89,8 @@ class FriendicaExtension extends BaseDataTransferObject
?string $version,
?string $sitename,
?FriendicaDeliveryData $delivery_data,
?FriendicaVisibility $visibility
?FriendicaVisibility $visibility,
?string $content
) {
$this->title = $title;
$this->changed_at = $changed_at ? DateTimeFormat::utc($changed_at, DateTimeFormat::JSON) : null;
@ -100,6 +104,7 @@ class FriendicaExtension extends BaseDataTransferObject
$this->version = $version;
$this->sitename = $sitename;
$this->visibility = $visibility;
$this->content = $content;
}
/**