diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2019-01-18 15:53:58 -0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2019-01-19 11:14:38 -0100 |
commit | d207a22f33315063e6a29aaa41f58597834be381 (patch) | |
tree | 7c82abd971a9b9f7e43cac35f78fff095e149ab8 /lib/Service | |
parent | 5236dd4ae8df3fbe58cc2b469dde5cfba36cf68c (diff) |
cleaning
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Service')
-rw-r--r-- | lib/Service/ActorService.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Service/ActorService.php b/lib/Service/ActorService.php index 8dea61bd..3510f7b1 100644 --- a/lib/Service/ActorService.php +++ b/lib/Service/ActorService.php @@ -143,12 +143,10 @@ class ActorService { */ private function cacheDocumentIfNeeded(Person $actor) { if ($actor->gotIcon()) { + $icon = $actor->getIcon(); try { - $icon = $this->cacheDocumentsRequest->getBySource( - $actor->getIcon() - ->getUrl() - ); - $actor->setIcon($icon); + $cache = $this->cacheDocumentsRequest->getByUrl($icon->getUrl()); + $actor->setIcon($cache); } catch (CacheDocumentDoesNotExistException $e) { $this->cacheDocumentsRequest->save($actor->getIcon()); } |