Skip to content

Commit 04b9bd1

Browse files
fixup! feat: jmap support - initial
Signed-off-by: SebastianKrupinski <[email protected]>
1 parent 8c5effd commit 04b9bd1

7 files changed

Lines changed: 23 additions & 20 deletions

lib/Command/CreateImapAccount.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
77
* SPDX-FileCopyrightText: 2014-2016 owncloud, Inc.
8-
* SPDX-License-Identifier: AGPL-3.0-or-later
8+
* SPDX-License-Identifier: AGPL-3.0-only
99
*/
1010

1111
namespace OCA\Mail\Command;

lib/Db/MailAccount.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ public function __construct(array $params = []) {
303303
$this->addType('classificationEnabled', 'boolean');
304304
$this->addType('imipCreate', 'boolean');
305305
$this->addType('protocol', 'string');
306+
$this->addType('path', 'string');
306307
}
307308

308309
public function getOutOfOfficeFollowsSystem(): bool {
@@ -354,7 +355,7 @@ public function toJson() {
354355
'debug' => $this->getDebug(),
355356
'classificationEnabled' => $this->getClassificationEnabled(),
356357
'imipCreate' => $this->getImipCreate(),
357-
'protocol' => $this->getProtocol() ?? self::PROTOCOL_IMAP,
358+
'protocol' => $this->getProtocol(),
358359
'path' => $this->getPath(),
359360
];
360361

lib/Db/Mailbox.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@
5656
* @method void setShared(bool $shared)
5757
* @method string getNameHash()
5858
* @method void setNameHash(string $nameHash)
59-
* @method string|null getRpid()
60-
* @method void setRpid(?string $rpid)
61-
* @method string|null getRid()
62-
* @method void setRid(?string $rid)
59+
* @method string|null getRemoteParentId()
60+
* @method void setRemoteParentId(?string $remoteParentId)
61+
* @method string|null getRemoteId()
62+
* @method void setRemoteId(?string $remoteId)
6363
* @method string|null getState()
6464
* @method void setState(?string $state)
6565
*/
@@ -82,8 +82,8 @@ class Mailbox extends Entity implements JsonSerializable {
8282
protected $myAcls;
8383
protected $shared;
8484
protected $nameHash;
85-
protected ?string $rpid = null;
86-
protected ?string $rid = null;
85+
protected ?string $remoteParentId = null;
86+
protected ?string $remoteId = null;
8787
protected ?string $state = null;
8888

8989
/**

lib/Db/Message.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@
7373
* @method void setEncrypted(bool|null $encrypted)
7474
* @method bool getMentionsMe()
7575
* @method void setMentionsMe(bool $isMentionned)
76-
* @method string|null getRid()
77-
* @method void setRid(?string $rid)
76+
* @method string|null getRemoteId()
77+
* @method void setRemoteId(?string $remoteId)
7878
*/
7979
class Message extends Entity implements JsonSerializable {
8080
private const MUTABLE_FLAGS = [
@@ -119,7 +119,7 @@ class Message extends Entity implements JsonSerializable {
119119
protected $imipProcessed = false;
120120
protected $imipError = false;
121121
protected $mentionsMe = false;
122-
protected ?string $rid = null;
122+
protected ?string $remoteId = null;
123123

124124
/**
125125
* @var bool|null
@@ -345,6 +345,7 @@ public function jsonSerialize() {
345345
return [
346346
'databaseId' => $this->getId(),
347347
'uid' => $this->getUid(),
348+
'remoteId' => $this->getRemoteId(),
348349
'subject' => $this->getSubject(),
349350
'dateInt' => $this->getSentAt(),
350351
'flags' => [

lib/Migration/Version5800Date20260401000001.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
* @psalm-api
2222
*/
2323
#[AddColumn(table: 'mail_accounts', name: 'protocol', type: ColumnType::STRING)]
24+
#[AddColumn(table: 'mail_accounts', name: 'path', type: ColumnType::STRING)]
2425
class Version5800Date20260401000001 extends SimpleMigrationStep {
2526

2627
/**

lib/Migration/Version5800Date20260401000002.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
/**
2121
* @psalm-api
2222
*/
23-
#[AddColumn(table: 'mail_mailboxes', name: 'rpid', type: ColumnType::STRING)]
24-
#[AddColumn(table: 'mail_mailboxes', name: 'rid', type: ColumnType::STRING)]
23+
#[AddColumn(table: 'mail_mailboxes', name: 'remote_parent_id', type: ColumnType::STRING)]
24+
#[AddColumn(table: 'mail_mailboxes', name: 'remote_id', type: ColumnType::STRING)]
2525
#[AddColumn(table: 'mail_mailboxes', name: 'state', type: ColumnType::STRING)]
2626
class Version5800Date20260401000002 extends SimpleMigrationStep {
2727

@@ -35,15 +35,15 @@ class Version5800Date20260401000002 extends SimpleMigrationStep {
3535
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
3636
$schema = $schemaClosure();
3737
$mailboxesTable = $schema->getTable('mail_mailboxes');
38-
if (!$mailboxesTable->hasColumn('rpid')) {
39-
$mailboxesTable->addColumn('rpid', Types::STRING, [
38+
if (!$mailboxesTable->hasColumn('remote_parent_id')) {
39+
$mailboxesTable->addColumn('remote_parent_id', Types::STRING, [
4040
'length' => 255,
4141
'notnull' => false,
4242
'default' => null,
4343
]);
4444
}
45-
if (!$mailboxesTable->hasColumn('rid')) {
46-
$mailboxesTable->addColumn('rid', Types::STRING, [
45+
if (!$mailboxesTable->hasColumn('remote_id')) {
46+
$mailboxesTable->addColumn('remote_id', Types::STRING, [
4747
'length' => 255,
4848
'notnull' => false,
4949
'default' => null,

lib/Migration/Version5800Date20260401000003.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/**
2121
* @psalm-api
2222
*/
23-
#[AddColumn(table: 'mail_messages', name: 'rid', type: ColumnType::STRING)]
23+
#[AddColumn(table: 'mail_messages', name: 'remote_id', type: ColumnType::STRING)]
2424
class Version5800Date20260401000003 extends SimpleMigrationStep {
2525

2626
/**
@@ -34,8 +34,8 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
3434
$schema = $schemaClosure();
3535
$messagesTable = $schema->getTable('mail_messages');
3636

37-
if (!$messagesTable->hasColumn('rid')) {
38-
$messagesTable->addColumn('rid', Types::STRING, [
37+
if (!$messagesTable->hasColumn('remote_id')) {
38+
$messagesTable->addColumn('remote_id', Types::STRING, [
3939
'length' => 255,
4040
'notnull' => false,
4141
'default' => null,

0 commit comments

Comments
 (0)