From 6060d9cbf3e2afcce63d84d14ccbdf62d9d6cd35 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Fri, 2 Dec 2022 13:59:29 +0530 Subject: [PATCH] display name fix for thunderbird --- apps/dav/lib/CalDAV/Schedule/IMipPlugin.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php index 515072fd227bf..d1684976f4827 100644 --- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php +++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php @@ -180,6 +180,13 @@ public function schedule(Message $iTipMessage) { if ($senderName === null || empty(trim($senderName))) { $senderName = $this->userManager->getDisplayName($this->userId); } + //if sender name is empty sometimes in case of email client + if ($senderName === null || empty(trim($senderName))) { + $users = $this->userManager->getByEmail($sender); + if (count($users) === 1) { + $senderName = $users[0]->getDisplayName(); + } + } /** @var VEvent $vevent */ $vevent = $iTipMessage->message->VEVENT;