]> git.mxchange.org Git - friendica.git/commitdiff
Fallback to regular attachment display on oembed error
authorHypolite Petovan <mrpetovan@gmail.com>
Fri, 12 Jan 2018 03:34:02 +0000 (22:34 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Fri, 12 Jan 2018 03:34:02 +0000 (22:34 -0500)
src/Content/OEmbed.php

index 3ab5b4fea863a1a01a293ed16164ab0760b78d5f..836f5a2184efea783e7b41a80f97d2e0bff8cbd5 100644 (file)
@@ -131,14 +131,12 @@ class OEmbed
                $j->embedurl = $embedurl;
 
                // If fetching information doesn't work, then improve via internal functions
-               if (($j->type == "error") || ($no_rich_type && ($j->type == "rich"))) {
+               if ($no_rich_type && ($j->type == "rich")) {
                        $data = ParseUrl::getSiteinfoCached($embedurl, true, false);
                        $j->type = $data["type"];
 
                        if ($j->type == "photo") {
                                $j->url = $data["url"];
-                               //$j->width = $data["images"][0]["width"];
-                               //$j->height = $data["images"][0]["height"];
                        }
 
                        if (isset($data["title"])) {