Add `og:image:url` detection
authorjoshuaruesweg <ruesweg@woltlab.com>
Tue, 16 Mar 2021 15:07:49 +0000 (16:07 +0100)
committerjoshuaruesweg <ruesweg@woltlab.com>
Tue, 16 Mar 2021 15:19:16 +0000 (16:19 +0100)
wcfsetup/install/files/lib/system/message/unfurl/UnfurlResponse.class.php

index 42f369b98952ce56af87094ef9a83b16a62ecc2a..85f4102158a858cbe038ef5a1cb133d76c1b6029 100644 (file)
@@ -254,6 +254,13 @@ final class UnfurlResponse
                 /** @var \DOMElement $node */
                 return $node->getAttribute("content");
             }
+
+            // og:image:url
+            $list = $this->domXPath->query("//meta[@property='og:image:url']");
+            foreach ($list as $node) {
+                /** @var \DOMElement $node */
+                return $node->getAttribute("content");
+            }
         }
 
         return null;