Merge pull request #1353 from jonnybarnes/1349-webmentions-are-not-showing

Fix processing of profile image for bridgy webmentions
This commit is contained in:
Jonny Barnes 2024-03-22 18:57:53 +00:00 committed by GitHub
commit dfe74e7538
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.
*/
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);
$host = parse_url($url, PHP_URL_HOST);