aboutsummaryrefslogtreecommitdiffstats
path: root/apps/cloud_federation_api/lib/Controller
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2018-06-13 11:57:00 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2018-07-02 11:29:30 +0200
commit22d92461346a795ed9ec7047ba191f02db81c4d1 (patch)
tree371e56a983f684e3f7a0238ef2dc9493a3d56db8 /apps/cloud_federation_api/lib/Controller
parent27814127ddce1c1859fdd42890262144aa410314 (diff)
downloadnextcloud-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.php8
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);
}