mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-20 15:43:42 +00:00
[twitter] Add expected dimensions in parse_url hook function
- Addresses https://github.com/friendica/friendica/issues/9447#issuecomment-722024085
This commit is contained in:
parent
4da668be69
commit
d0d2a3269a
1 changed files with 5 additions and 1 deletions
|
@ -935,7 +935,11 @@ function twitter_parse_link(App $a, array &$b)
|
||||||
|
|
||||||
if ($b['format'] == 'json') {
|
if ($b['format'] == 'json') {
|
||||||
if (!empty($status->extended_entities->media[0]->media_url_https)) {
|
if (!empty($status->extended_entities->media[0]->media_url_https)) {
|
||||||
$images = [['src' => $status->extended_entities->media[0]->media_url_https]];
|
$images = [[
|
||||||
|
'src' => $status->extended_entities->media[0]->media_url_https,
|
||||||
|
'width' => $status->extended_entities->media[0]->sizes->thumb->w,
|
||||||
|
'height' => $status->extended_entities->media[0]->sizes->thumb->h,
|
||||||
|
]];
|
||||||
}
|
}
|
||||||
|
|
||||||
$b['text'] = [
|
$b['text'] = [
|
||||||
|
|
Loading…
Reference in a new issue