diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2018-12-05 20:19:59 -0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2018-12-05 20:19:59 -0100 |
commit | 589e39b5729cb509083db398e792cc001d1b391f (patch) | |
tree | fce404d243816069b770649c5a92691c7c3bc7ad /lib | |
parent | a850153582900141a7f5b6f83d8d07a05bee5cab (diff) |
use cache instead to display account
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/ActivityPubController.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Controller/ActivityPubController.php b/lib/Controller/ActivityPubController.php index ce92a2e5..b686bf65 100644 --- a/lib/Controller/ActivityPubController.php +++ b/lib/Controller/ActivityPubController.php @@ -38,6 +38,7 @@ use OCA\Social\Db\NotesRequest; use OCA\Social\Exceptions\SignatureIsGoneException; use OCA\Social\Exceptions\UnknownItemException; use OCA\Social\Service\ActivityPub\FollowService; +use OCA\Social\Service\ActivityPub\PersonService; use OCA\Social\Service\ActivityService; use OCA\Social\Service\ActorService; use OCA\Social\Service\ImportService; @@ -69,6 +70,9 @@ class ActivityPubController extends Controller { /** @var ActorService */ private $actorService; + /** @var PersonService */ + private $personService; + /** @var NotesRequest */ private $notesRequest; @@ -85,14 +89,15 @@ class ActivityPubController extends Controller { * @param ImportService $importService * @param FollowService $followService * @param ActorService $actorService + * @param PersonService $personService * @param NotesRequest $notesRequest * @param MiscService $miscService */ public function __construct( IRequest $request, SocialPubController $socialPubController, ActivityService $activityService, ImportService $importService, - FollowService $followService, ActorService $actorService, NotesRequest $notesRequest, - MiscService $miscService + FollowService $followService, ActorService $actorService, PersonService $personService, + NotesRequest $notesRequest, MiscService $miscService ) { parent::__construct(Application::APP_NAME, $request); @@ -102,6 +107,7 @@ class ActivityPubController extends Controller { $this->importService = $importService; $this->followService = $followService; $this->actorService = $actorService; + $this->personService = $personService; $this->notesRequest = $notesRequest; $this->miscService = $miscService; } @@ -128,7 +134,7 @@ class ActivityPubController extends Controller { } try { - $actor = $this->actorService->getActor($username); + $actor = $this->personService->getFromLocalAccount($username); // $actor->setTopLevel(true); |