From 5c22cff5a97135624c904112bd5bfbdcaf11cb37 Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Wed, 15 Mar 2023 17:28:01 -0100 Subject: set avatar Signed-off-by: Maxence Lange --- lib/Model/ActivityPub/Actor/Person.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Model/ActivityPub/Actor/Person.php b/lib/Model/ActivityPub/Actor/Person.php index 86a8c3e5..d155e6bc 100644 --- a/lib/Model/ActivityPub/Actor/Person.php +++ b/lib/Model/ActivityPub/Actor/Person.php @@ -697,6 +697,12 @@ class Person extends ACore implements IQueryRow, JsonSerializable { ->setFeatured($this->validate(self::AS_URL, 'featured', $data, '')) ->setDetailsAll($this->getArray('details', $data, [])); + if ($this->hasIcon()) { + $this->setAvatar($this->getIcon()->getUrl()); + } else { + $this->setAvatar($this->getAvatar()); + } + try { $cTime = new DateTime($this->get('creation', $data, 'yesterday')); $this->setCreation($cTime->getTimestamp()); -- cgit v1.2.3