Skip to content

Commit 298907f

Browse files
fixup! feat: automated appointment creation
Signed-off-by: SebastianKrupinski <[email protected]>
1 parent 80b093a commit 298907f

File tree

4 files changed

+28
-4
lines changed

4 files changed

+28
-4
lines changed

lib/Migration/Version5007Date20251208000000.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
2828
$accountsTable = $schema->getTable('mail_accounts');
2929
if (!$accountsTable->hasColumn('imip_create')) {
3030
$accountsTable->addColumn('imip_create', Types::BOOLEAN, [
31-
'default' => '0',
32-
'notNull' => false,
31+
'default' => false,
32+
'notnull' => false,
3333
]);
3434
}
3535
return $schema;

lib/Service/IMipService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
use OCA\Mail\Db\MessageMapper;
1717
use OCA\Mail\Exception\ServiceException;
1818
use OCA\Mail\Model\IMAPMessage;
19+
use OCA\Mail\Util\ServerVersion;
1920
use OCP\AppFramework\Db\DoesNotExistException;
2021
use OCP\Calendar\IManager;
21-
use OCP\ServerVersion;
2222
use Psr\Log\LoggerInterface;
2323
use Throwable;
2424

lib/Util/ServerVersion.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
7+
* SPDX-License-Identifier: AGPL-3.0-or-later
8+
*/
9+
10+
namespace OCA\Mail\Util;
11+
12+
use OCP\ServerVersion as OCPServerVersion;
13+
14+
class ServerVersion {
15+
16+
public function __construct(
17+
private OCPServerVersion $serverVersion
18+
) {}
19+
20+
public function getMajorVersion(): int {
21+
return $this->serverVersion->getMajorVersion();
22+
}
23+
24+
}

tests/Unit/Service/IMipServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
use OCA\Mail\Service\AccountService;
2424
use OCA\Mail\Service\IMipService;
2525
use OCA\Mail\Service\MailManager;
26+
use OCA\Mail\Util\ServerVersion;
2627
use OCP\Calendar\IManager;
27-
use OCP\ServerVersion;
2828
use PHPUnit\Framework\MockObject\MockObject;
2929
use Psr\Log\LoggerInterface;
3030

0 commit comments

Comments
 (0)