diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2020-09-22 21:15:07 -0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-22 21:15:07 -0100 |
commit | 261b7c70036566e71157234c2ae61dddb9e645a9 (patch) | |
tree | 56cba062c557a6019385ab3ae897b56265fd0f53 /lib | |
parent | cb940981cd67d80824bacd487861f19bafa9c97d (diff) | |
parent | 952ffb94a68440cc93d383a30e40e78e24cd9d5d (diff) |
Merge pull request #1027 from nextcloud/ostatus-follow
render profile page for ostatus follow url
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/OStatusController.php | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/Controller/OStatusController.php b/lib/Controller/OStatusController.php index 3ca22a34..07cd4a92 100644 --- a/lib/Controller/OStatusController.php +++ b/lib/Controller/OStatusController.php @@ -72,12 +72,15 @@ class OStatusController extends Controller { /** @var IUserManager */ private $userSession; + /** @var IInitialStateService */ + private $initialStateService; /** * OStatusController constructor. * * @param IRequest $request + * @param IInitialStateService $initialStateService * @param CacheActorService $cacheActorService * @param AccountService $accountService * @param CurlService $curlService @@ -122,14 +125,14 @@ class OStatusController extends Controller { } $this->initialStateService->provideInitialState('social', 'serverData', [ - 'account' => $actor->getAccount(), + 'account' => $actor->getAccount(), 'currentUser' => [ - 'uid' => $user->getUID(), + 'uid' => $user->getUID(), 'displayName' => $user->getDisplayName(), - ] + ], ]); return new TemplateResponse( - 'social', 'main', 'guest' + 'social', 'main', [] ); } catch (Exception $e) { return $this->fail($e); @@ -151,11 +154,11 @@ class OStatusController extends Controller { $following = $this->accountService->getActor($local); $this->initialStateService->provideInitialState('social', 'serverData', [ - 'local' => $local, - 'account' => $following->getAccount() + 'local' => $local, + 'account' => $following->getAccount(), ]); return new TemplateResponse( - 'social', 'main', 'guest' + 'social', 'main', [], 'guest' ); } catch (Exception $e) { return $this->fail($e); |