Loading lib/AppInfo/Application.php +3 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ use OCA\Calendar\Middleware\InvitationMiddleware; use OCA\Calendar\Notification\Notifier; use OCA\Calendar\Profile\AppointmentsAction; use OCA\Calendar\Reference\ReferenceProvider; use OCA\DAV\Connector\Sabre\Principal; use OCP\AppFramework\App; use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; Loading Loading @@ -65,6 +66,7 @@ class Application extends App implements IBootstrap { $c->get(LoggerInterface::class), $c->get(IUserManager::class), $c->get(L10NFactory::class), $c->get(Principal::class), ); }); Loading @@ -89,6 +91,7 @@ class Application extends App implements IBootstrap { $c->get(LoggerInterface::class), $c->get(IUserManager::class), $c->get(L10NFactory::class), $c->get(Principal::class), ); }); Loading lib/Middleware/InvitationMiddleware.php +20 −6 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace OCA\Calendar\Middleware; use OCA\Calendar\Controller\InvitationMaybeController; use OCA\DAV\Connector\Sabre\Principal; use OCA\Dav\Controller\InvitationResponseController; use OCP\AppFramework\Http\Response; use OCP\AppFramework\Middleware; Loading Loading @@ -34,6 +35,7 @@ class InvitationMiddleware extends Middleware { LoggerInterface $logger, IUserManager $iusermanager, IFactory $languageFactory, private Principal $principalBackend, ) { $this->request = $request; $this->config = $config; Loading Loading @@ -75,17 +77,27 @@ class InvitationMiddleware extends Middleware { $uid = $row['uid']; $sender = substr($row['attendee'], 7); $recipient = substr($row['organizer'], 7); $organizer = $row['organizer']; $recipient = substr($organizer, 7); $principalUriOfOrganizer = $this->principalBackend->findByUri($organizer, 'principals/users'); if ($principalUriOfOrganizer === null) { $this->logger->warning('Principal URI not found for organizer', ['organizer' => $organizer]); return $response; } $query2 = $this->db->getQueryBuilder(); $query2 ->select('*') ->from('calendarobjects') ->select('co.*') ->from('calendarobjects', 'co') ->join('co', 'calendars', 'c', $query2->expr()->eq('co.calendarid', 'c.id')) ->where( $query $query2 ->expr() ->eq('uid', $query2->createNamedParameter($uid)) ); )->andWhere($query2->expr()->eq('c.principaluri', $query2->createNamedParameter($principalUriOfOrganizer))); $stmt2 = $query2->execute(); $row2 = $stmt2->fetch(\PDO::FETCH_ASSOC); $calendarobjectid = $row2['id']; Loading Loading @@ -150,6 +162,8 @@ class InvitationMiddleware extends Middleware { $organizername = $recipient; } $defaultVal = ''; if ($methodName === 'tentative') { $meetingTitle = $this->l10n->t('Invitation Tentatively Accepted: %s', [$SUMMARY]); Loading Loading
lib/AppInfo/Application.php +3 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ use OCA\Calendar\Middleware\InvitationMiddleware; use OCA\Calendar\Notification\Notifier; use OCA\Calendar\Profile\AppointmentsAction; use OCA\Calendar\Reference\ReferenceProvider; use OCA\DAV\Connector\Sabre\Principal; use OCP\AppFramework\App; use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; Loading Loading @@ -65,6 +66,7 @@ class Application extends App implements IBootstrap { $c->get(LoggerInterface::class), $c->get(IUserManager::class), $c->get(L10NFactory::class), $c->get(Principal::class), ); }); Loading @@ -89,6 +91,7 @@ class Application extends App implements IBootstrap { $c->get(LoggerInterface::class), $c->get(IUserManager::class), $c->get(L10NFactory::class), $c->get(Principal::class), ); }); Loading
lib/Middleware/InvitationMiddleware.php +20 −6 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace OCA\Calendar\Middleware; use OCA\Calendar\Controller\InvitationMaybeController; use OCA\DAV\Connector\Sabre\Principal; use OCA\Dav\Controller\InvitationResponseController; use OCP\AppFramework\Http\Response; use OCP\AppFramework\Middleware; Loading Loading @@ -34,6 +35,7 @@ class InvitationMiddleware extends Middleware { LoggerInterface $logger, IUserManager $iusermanager, IFactory $languageFactory, private Principal $principalBackend, ) { $this->request = $request; $this->config = $config; Loading Loading @@ -75,17 +77,27 @@ class InvitationMiddleware extends Middleware { $uid = $row['uid']; $sender = substr($row['attendee'], 7); $recipient = substr($row['organizer'], 7); $organizer = $row['organizer']; $recipient = substr($organizer, 7); $principalUriOfOrganizer = $this->principalBackend->findByUri($organizer, 'principals/users'); if ($principalUriOfOrganizer === null) { $this->logger->warning('Principal URI not found for organizer', ['organizer' => $organizer]); return $response; } $query2 = $this->db->getQueryBuilder(); $query2 ->select('*') ->from('calendarobjects') ->select('co.*') ->from('calendarobjects', 'co') ->join('co', 'calendars', 'c', $query2->expr()->eq('co.calendarid', 'c.id')) ->where( $query $query2 ->expr() ->eq('uid', $query2->createNamedParameter($uid)) ); )->andWhere($query2->expr()->eq('c.principaluri', $query2->createNamedParameter($principalUriOfOrganizer))); $stmt2 = $query2->execute(); $row2 = $stmt2->fetch(\PDO::FETCH_ASSOC); $calendarobjectid = $row2['id']; Loading Loading @@ -150,6 +162,8 @@ class InvitationMiddleware extends Middleware { $organizername = $recipient; } $defaultVal = ''; if ($methodName === 'tentative') { $meetingTitle = $this->l10n->t('Invitation Tentatively Accepted: %s', [$SUMMARY]); Loading