Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-11-26 16:42:31 +0300
committerJulius Härtl <jus@bitgrid.net>2021-12-03 12:17:02 +0300
commit5116bf146f3e21805d42997ca9b1f713474bfb6d (patch)
treef0b0fc2d88f905d22a1331f9ebd85aee792c8522 /apps/files_sharing/lib
parent70f9e5e37dde34a976d7aab1a9cdeec165cb5df1 (diff)
Allow to pass note when creating a share and send it with directly in the share mail when set
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index c9853f1e12c..96b105aae49 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -449,6 +449,7 @@ class ShareAPIController extends OCSController {
string $password = '',
string $sendPasswordByTalk = null,
string $expireDate = '',
+ string $note = '',
string $label = ''
): DataResponse {
$share = $this->shareManager->newShare();
@@ -653,6 +654,10 @@ class ShareAPIController extends OCSController {
$share->setShareType($shareType);
$share->setSharedBy($this->currentUser);
+ if ($note !== '') {
+ $share->setNote($note);
+ }
+
try {
$share = $this->shareManager->createShare($share);
} catch (GenericShareException $e) {