Merge pull request #9964 from annando/fix-link-preview

Fix link preview with videos
2022.09-rc
Hypolite Petovan 2021-02-27 17:52:02 -05:00 zatwierdzone przez GitHub
commit a5dde7a69b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -96,7 +96,8 @@ class ParseUrl extends BaseModule
if ($format == 'json') {
$siteinfo = Util\ParseUrl::getSiteinfoCached($url);
if (in_array($siteinfo['type'], ['image', 'video', 'audio'])) {
if (empty($siteinfo['title']) && empty($siteinfo['text']) && empty($siteinfo['image'])
&& in_array($siteinfo['type'], ['image', 'video', 'audio'])) {
switch ($siteinfo['type']) {
case 'video':
$content_type = 'video';