fix(fediverse): set default castopod avatar url when actor avatar is not present
This commit is contained in:
parent
1c8af7550b
commit
460f52f70e
|
@ -23,6 +23,10 @@ class Fediverse extends FediverseBaseConfig
|
|||
*/
|
||||
public string $noteObject = NoteObject::class;
|
||||
|
||||
public string $defaultAvatarImagePath = 'media/castopod-avatar_thumbnail.webp';
|
||||
|
||||
public string $defaultAvatarImageMimetype = 'image/webp';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
|
|
@ -48,7 +48,7 @@ class Actor extends FediverseActor
|
|||
return $this->podcast->cover->thumbnail_url;
|
||||
}
|
||||
|
||||
return $this->attributes['avatar_image_url'];
|
||||
return parent::getAvatarImageUrl();
|
||||
}
|
||||
|
||||
public function getAvatarImageMimetype(): string
|
||||
|
@ -57,6 +57,6 @@ class Actor extends FediverseActor
|
|||
return $this->podcast->cover->thumbnail_mimetype;
|
||||
}
|
||||
|
||||
return $this->attributes['avatar_image_mimetype'];
|
||||
return parent::getAvatarImageMimetype();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue