mirror of
https://github.com/friendica/friendica
synced 2025-04-26 11:50:11 +00:00
Transmit mediaType for headers as well / use blank image for empty header
This commit is contained in:
parent
dd39b3203b
commit
df05d6b52a
2 changed files with 10 additions and 1 deletions
|
@ -391,6 +391,14 @@ class Transmitter
|
|||
|
||||
if (!empty($contact['header'])) {
|
||||
$data['image'] = ['type' => 'Image', 'url' => $contact['header']];
|
||||
|
||||
$resourceid = Photo::ridFromURI($contact['header']);
|
||||
if (!empty($resourceid)) {
|
||||
$photo = Photo::selectFirst(['type'], ["resource-id" => $resourceid]);
|
||||
if (!empty($photo['type'])) {
|
||||
$data['image']['mediaType'] = $photo['type'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$data['generator'] = self::getService();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue