aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Share20/DefaultShareProvider.php
diff options
context:
space:
mode:
authorskjnldsv <skjnldsv@protonmail.com>2024-07-09 15:38:33 +0200
committerJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-07-12 20:14:30 +0200
commit967b3848e0e2eeb7ca5447599769fd9fbf825069 (patch)
tree2711b6de5aa29c96d30c79de16f29fd72aa1396e /lib/private/Share20/DefaultShareProvider.php
parentbc5839e5b5e2192ed7d2dd2173ab5ca72b1d8ebc (diff)
downloadnextcloud-server-967b3848e0e2eeb7ca5447599769fd9fbf825069.tar.gz
nextcloud-server-967b3848e0e2eeb7ca5447599769fd9fbf825069.zip
fix(files_sharing): phpunit & openapi fixes
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'lib/private/Share20/DefaultShareProvider.php')
-rw-r--r--lib/private/Share20/DefaultShareProvider.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php
index a2a6483f8d5..658353b9a26 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -1488,12 +1488,16 @@ class DefaultShareProvider implements IShareProviderWithNotification {
// The "Reply-To" is set to the sharer if an mail address is configured
// also the default footer contains a "Do not reply" which needs to be adjusted.
- $initiatorEmail = $initiatorUser->getEMailAddress();
- if ($initiatorEmail !== null) {
- $message->setReplyTo([$initiatorEmail => $initiatorDisplayName]);
- $emailTemplate->addFooter($instanceName . ($this->defaults->getSlogan($l->getLanguageCode()) !== '' ? ' - ' . $this->defaults->getSlogan($l->getLanguageCode()) : ''));
+ if ($initiatorUser) {
+ $initiatorEmail = $initiatorUser->getEMailAddress();
+ if ($initiatorEmail !== null) {
+ $message->setReplyTo([$initiatorEmail => $initiatorDisplayName]);
+ $emailTemplate->addFooter($instanceName . ($this->defaults->getSlogan() !== '' ? ' - ' . $this->defaults->getSlogan() : ''));
+ } else {
+ $emailTemplate->addFooter();
+ }
} else {
- $emailTemplate->addFooter('', $l->getLanguageCode());
+ $emailTemplate->addFooter();
}
$message->useTemplate($emailTemplate);