update avatar url

This commit is contained in:
Simon Vieille 2022-02-06 22:40:42 +01:00
parent e3279314f9
commit 7de632db35

View file

@ -211,7 +211,10 @@ class Comment implements EntityInterface
*/
public function getAvatar(): string
{
return 'https://secure.gravatar.com/avatar/'.md5($this->getEmail() ?? 'undefined@undefined').'.jpg?s=90&d=retro';
$mail = $this->getEmail() ?? sprintf('%d@deblan.io', $this->getId());
$hash = md5($mail);
return 'https://cdn.libravatar.org/avatar/'.$hash.'?s=90&d=retro';
}
/**