mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-10 07:14:32 +02:00
Improved support for "Page" type
This commit is contained in:
parent
9d25c3a8f6
commit
9eec2bf5f3
3 changed files with 15 additions and 1 deletions
|
@ -1454,6 +1454,14 @@ class Receiver
|
|||
$object_data['attachments'] = array_merge($object_data['attachments'], self::processAttachmentUrls($object['as:url'] ?? []));
|
||||
}
|
||||
|
||||
// For page types we expect that the alternate url posts to some page.
|
||||
// So we add this to the attachments if it differs from the id.
|
||||
// Currently only Lemmy is using the page type.
|
||||
if (($object_data['object_type'] == 'as:Page') && !empty($object_data['alternate-url']) && !Strings::compareLink($object_data['alternate-url'], $object_data['id'])) {
|
||||
$object_data['attachments'][] = ['url' => $object_data['alternate-url']];
|
||||
$object_data['alternate-url'] = null;
|
||||
}
|
||||
|
||||
$receiverdata = self::getReceivers($object, $object_data['actor'], $object_data['tags'], true);
|
||||
$receivers = $reception_types = [];
|
||||
foreach ($receiverdata as $key => $data) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue