Skip to content

Commit 76e2de3

Browse files
fixup! feat: automated appointment creation
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
1 parent 298907f commit 76e2de3

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

lib/Service/IMipService.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct(
4040
MailboxMapper $mailboxMapper,
4141
MailManager $mailManager,
4242
MessageMapper $messageMapper,
43-
ServerVersion $serverVersion
43+
ServerVersion $serverVersion,
4444
) {
4545
$this->accountService = $accountService;
4646
$this->calendarManager = $manager;
@@ -156,6 +156,10 @@ public function process(): void {
156156
$processed = $this->calendarManager->handleIMipCancel($principalUri, $sender, $replyTo, $recipient, $schedulingInfo['contents']);
157157
}
158158
} else {
159+
if (!method_exists($this->calendarManager, 'handleIMip')) {
160+
$this->logger->error('iMIP handling is not supported by server version installed.');
161+
continue;
162+
}
159163
$processed = $this->calendarManager->handleIMip(
160164
$userId,
161165
$schedulingInfo['contents'],

lib/Util/ServerVersion.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313

1414
class ServerVersion {
1515

16-
public function __construct(
17-
private OCPServerVersion $serverVersion
18-
) {}
16+
public function __construct(
17+
private OCPServerVersion $serverVersion,
18+
) {
19+
}
1920

20-
public function getMajorVersion(): int {
21+
public function getMajorVersion(): int {
2122
return $this->serverVersion->getMajorVersion();
2223
}
2324

24-
}
25+
}

0 commit comments

Comments
 (0)