diff options
author | skjnldsv <skjnldsv@protonmail.com> | 2024-07-05 09:47:40 +0200 |
---|---|---|
committer | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-07-12 20:14:30 +0200 |
commit | d388370c3b4bd50d1ad7668aef9000bd54a8c442 (patch) | |
tree | 90b98683ee1245ff50c233a7cebe0a2130913c26 /lib/public/Share | |
parent | 443c48aefb70983afefce48652880a1bcaad4d53 (diff) | |
download | nextcloud-server-d388370c3b4bd50d1ad7668aef9000bd54a8c442.tar.gz nextcloud-server-d388370c3b4bd50d1ad7668aef9000bd54a8c442.zip |
feat(files_sharing): implement IShareProviderWithNotification and refactor sendMailNotification
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'lib/public/Share')
-rw-r--r-- | lib/public/Share/IShare.php | 4 | ||||
-rw-r--r-- | lib/public/Share/IShareProviderWithNotification.php | 24 |
2 files changed, 26 insertions, 2 deletions
diff --git a/lib/public/Share/IShare.php b/lib/public/Share/IShare.php index 91eebd3afa9..fe5e7eb47dd 100644 --- a/lib/public/Share/IShare.php +++ b/lib/public/Share/IShare.php @@ -564,7 +564,7 @@ interface IShare { public function getShareTime(); /** - * Set if the recipient is informed by mail about the share. + * Set if the recipient should be informed by mail about the share. * * @param bool $mailSend * @return \OCP\Share\IShare The modified object @@ -573,7 +573,7 @@ interface IShare { public function setMailSend($mailSend); /** - * Get if the recipient informed by mail about the share. + * Get if the recipient should be informed by mail about the share. * * @return bool * @since 9.0.0 diff --git a/lib/public/Share/IShareProviderWithNotification.php b/lib/public/Share/IShareProviderWithNotification.php new file mode 100644 index 00000000000..8a595f46dfd --- /dev/null +++ b/lib/public/Share/IShareProviderWithNotification.php @@ -0,0 +1,24 @@ +<?php + +/** + * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-FileCopyrightText: 2016 ownCloud, Inc. + * SPDX-License-Identifier: AGPL-3.0-only + */ +namespace OCP\Share; + +/** + * Interface IShareProvider + * + * @since 30.0.0 + */ +interface IShareProviderWithNotification extends IShareProvider { + /** + * Send a mail notification to the recipient of a share + * @param IShare $share + * @return bool True if the mail was sent successfully + * @throws Exception If the mail could not be sent + * @since 30.0.0 + */ + public function sendMailNotification(IShare $share): bool; +} |