diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2018-06-13 11:57:00 +0200 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2018-07-02 11:29:30 +0200 |
commit | 22d92461346a795ed9ec7047ba191f02db81c4d1 (patch) | |
tree | 371e56a983f684e3f7a0238ef2dc9493a3d56db8 /apps/cloud_federation_api/lib/Controller | |
parent | 27814127ddce1c1859fdd42890262144aa410314 (diff) | |
download | nextcloud-server-22d92461346a795ed9ec7047ba191f02db81c4d1.tar.gz nextcloud-server-22d92461346a795ed9ec7047ba191f02db81c4d1.zip |
send the display name back after a federated share was received
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/cloud_federation_api/lib/Controller')
-rw-r--r-- | apps/cloud_federation_api/lib/Controller/RequestHandlerController.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php index 518cb88dff4..2020dcce015 100644 --- a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php +++ b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php @@ -186,8 +186,14 @@ class RequestHandlerController extends Controller { ); } + $user = $this->userManager->get($shareWithLocalId); + $recipientDisplayName = ''; + if($user) { + $recipientDisplayName = $user->getDisplayName(); + } + return new JSONResponse( - ['id' => $id, 'createdAt' => time()], + ['recipientDisplayName' => $recipientDisplayName], Http::STATUS_CREATED); } |