Merge pull request #1354 from jonnybarnes/develop

MTM Fix showing webmentions
This commit is contained in:
Jonny Barnes 2024-03-22 19:00:39 +00:00 committed by GitHub
commit 784f4cb44a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -109,8 +109,16 @@ class WebMention extends Model
/** /**
* Create the photo link. * Create the photo link.
*/ */
public function createPhotoLink(string $url): string public function createPhotoLink(string|array $url): string
{ {
if (is_array($url)) {
if (! array_key_exists('value', $url)) {
return '';
}
$url = $url['value'];
}
$url = normalize_url($url); $url = normalize_url($url);
$host = parse_url($url, PHP_URL_HOST); $host = parse_url($url, PHP_URL_HOST);