improve the json-ld metadata for the channel page

This commit is contained in:
Mike Macgirvin 2024-07-04 07:42:31 +10:00
parent 1c6bb7f31a
commit 60209232b4

View file

@ -230,8 +230,18 @@ class Channel extends Controller
'@type' => 'xsd:string'
]]]
);
App::$meta->setjson('attributedTo', Zlib\Channel::getDidResolver($channel, true));
App::$meta->setjson('type', Activity::xchan_type_to_type((int)$channel['xchan_type']));
App::$meta->setjson('name', $channel['channel_name']);
App::$meta->setjson('id', Zlib\Channel::getDidResolver($channel, true));
App::$meta->setjson('webfinger', $channel['xchan_addr']);
App::$meta->setjson('icon', [
'type' => 'Image',
'mediaType' => (($channel['xchan_photo_mimetype']) ?: 'image/png'),
'updated' => Time::convert('UTC', 'UTC', $channel['xchan_photo_date'], ISO8601),
'url' => $channel['xchan_photo_l'],
'height' => 300,
'width' => 300,
]);
}
}