kopia lustrzana https://github.com/friendica/friendica
Transmit mediaType, preparation for header image
rodzic
47cb89967f
commit
dd39b3203b
|
@ -379,8 +379,19 @@ class Transmitter
|
|||
'owner' => $contact['url'],
|
||||
'publicKeyPem' => $user['pubkey']];
|
||||
$data['endpoints'] = ['sharedInbox' => DI::baseUrl() . '/inbox'];
|
||||
$data['icon'] = ['type' => 'Image',
|
||||
'url' => $contact['photo']];
|
||||
$data['icon'] = ['type' => 'Image', 'url' => $contact['photo']];
|
||||
|
||||
$resourceid = Photo::ridFromURI($contact['photo']);
|
||||
if (!empty($resourceid)) {
|
||||
$photo = Photo::selectFirst(['type'], ["resource-id" => $resourceid]);
|
||||
if (!empty($photo['type'])) {
|
||||
$data['icon']['mediaType'] = $photo['type'];
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($contact['header'])) {
|
||||
$data['image'] = ['type' => 'Image', 'url' => $contact['header']];
|
||||
}
|
||||
|
||||
$data['generator'] = self::getService();
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue