Quickfix to avoid bad looking incoming tweets

Fixes https://github.com/friendica/friendica/pull/10148#issuecomment-821512658
2022.09-rc
Michael 2021-04-17 07:26:03 +00:00
rodzic ccf0214411
commit f3b27dc789
1 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -477,10 +477,11 @@ class ParseUrl
}
}
// Currently deactivated, see https://github.com/friendica/friendica/pull/10148#issuecomment-821512658
// Prevent to have a photo type without an image
if ($twitter_card && $twitter_image && !empty($siteinfo['image'])) {
$siteinfo['type'] = 'photo';
}
// if ($twitter_card && $twitter_image && !empty($siteinfo['image'])) {
// $siteinfo['type'] = 'photo';
// }
if (!empty($siteinfo['image'])) {
$siteinfo['images'] = $siteinfo['images'] ?? [];