diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2023-03-15 17:28:01 -0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2023-03-15 17:28:01 -0100 |
commit | 5c22cff5a97135624c904112bd5bfbdcaf11cb37 (patch) | |
tree | 320b768336527061f2665e67582750bd0b4cba58 | |
parent | 5f0383fe7df3617226e8025a3c9aef4ec733c963 (diff) |
set avatarfix/noid/avatar-2
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r-- | lib/Model/ActivityPub/Actor/Person.php | 6 |
1 files changed, 6 insertions, 0 deletions
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()); |