Quickfix to avoid bad looking incoming tweets

Fixes https://github.com/friendica/friendica/pull/10148#issuecomment-821512658
This commit is contained in:
Michael 2021-04-17 07:26:03 +00:00
parent ccf0214411
commit f3b27dc789

View file

@ -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 // Prevent to have a photo type without an image
if ($twitter_card && $twitter_image && !empty($siteinfo['image'])) { // if ($twitter_card && $twitter_image && !empty($siteinfo['image'])) {
$siteinfo['type'] = 'photo'; // $siteinfo['type'] = 'photo';
} // }
if (!empty($siteinfo['image'])) { if (!empty($siteinfo['image'])) {
$siteinfo['images'] = $siteinfo['images'] ?? []; $siteinfo['images'] = $siteinfo['images'] ?? [];