send the display name back after a federated share was received

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
Bjoern Schiessle 2018-06-13 11:57:00 +02:00
parent 27814127dd
commit 22d9246134
No known key found for this signature in database
GPG Key ID: 2378A753E2BF04F6
1 changed files with 7 additions and 1 deletions

View File

@ -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);
}