We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 935a545 + 0f2013d commit e46f180Copy full SHA for e46f180
1 file changed
apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -658,7 +658,16 @@ public function createShare(
658
$this->checkInheritedAttributes($share);
659
660
// Handle mail send
661
- if ($sendMail === 'true' || $sendMail === 'false') {
+ if (is_null($sendMail)) {
662
+ // Define a default behavior when sendMail is not provided
663
+ if ($shareType === IShare::TYPE_EMAIL && strlen($shareWith) !== 0) {
664
+ // For email shares, the default is to send the mail
665
+ $share->setMailSend(true);
666
+ } else {
667
+ // For all other share types, the default is to not send the mail
668
+ $share->setMailSend(false);
669
+ }
670
671
$share->setMailSend($sendMail === 'true');
672
}
673
0 commit comments