summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CalDAV
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2017-11-14 15:01:53 +0100
committerGeorg Ehrke <developer@georgehrke.com>2017-11-14 21:23:27 +0100
commit072652b2af90011a54c5777b9032fe95aab5d7fc (patch)
tree442d8ac9df007b11285358f03062395ee2ada8d2 /apps/dav/lib/CalDAV
parent8e3861563b1312e312be36208caef6812bdb201a (diff)
downloadnextcloud-server-072652b2af90011a54c5777b9032fe95aab5d7fc.tar.gz
nextcloud-server-072652b2af90011a54c5777b9032fe95aab5d7fc.zip
show name of organizer in from name of invitation email
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'apps/dav/lib/CalDAV')
-rw-r--r--apps/dav/lib/CalDAV/Schedule/IMipPlugin.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
index edb52c3ad89..5e103bfc5c0 100644
--- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
+++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
@@ -26,6 +26,7 @@
namespace OCA\DAV\CalDAV\Schedule;
use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\Defaults;
use OCP\IConfig;
use OCP\IL10N;
use OCP\ILogger;
@@ -79,6 +80,9 @@ class IMipPlugin extends SabreIMipPlugin {
/** @var IURLGenerator */
private $urlGenerator;
+ /** @var Defaults */
+ private $defaults;
+
const MAX_DATE = '2038-01-01';
const METHOD_REQUEST = 'request';
@@ -92,9 +96,10 @@ class IMipPlugin extends SabreIMipPlugin {
* @param ITimeFactory $timeFactory
* @param L10NFactory $l10nFactory
* @param IUrlGenerator $urlGenerator
+ * @param Defaults $defaults
* @param string $userId
*/
- public function __construct(IConfig $config, IMailer $mailer, ILogger $logger, ITimeFactory $timeFactory, L10NFactory $l10nFactory, IURLGenerator $urlGenerator, $userId) {
+ public function __construct(IConfig $config, IMailer $mailer, ILogger $logger, ITimeFactory $timeFactory, L10NFactory $l10nFactory, IURLGenerator $urlGenerator, Defaults $defaults, $userId) {
parent::__construct('');
$this->userId = $userId;
$this->config = $config;
@@ -103,6 +108,7 @@ class IMipPlugin extends SabreIMipPlugin {
$this->timeFactory = $timeFactory;
$this->l10nFactory = $l10nFactory;
$this->urlGenerator = $urlGenerator;
+ $this->defaults = $defaults;
}
/**
@@ -202,7 +208,11 @@ class IMipPlugin extends SabreIMipPlugin {
'meeting_url' => (string)$meetingUrl ?: $defaultVal,
);
+ $fromEMail = \OCP\Util::getDefaultEmailAddress('invitations-noreply');
+ $fromName = $l10n->t('%s via %s', [$senderName, $this->defaults->getName()]);
+
$message = $this->mailer->createMessage()
+ ->setFrom([$fromEMail => $fromName])
->setReplyTo([$sender => $senderName])
->setTo([$recipient => $recipientName]);