feat: JMAP Mailbox sync — full and incremental (Step 4)

MailboxRepositoryImpl.syncMailboxes now dispatches on account type.
For JMAP accounts:
- First run: Mailbox/get → upsert all mailboxes, persist state.
- Subsequent runs: Mailbox/changes → fetch new/updated via Mailbox/get,
  delete destroyed rows, update state in sync_state.

path stores the JMAP mailbox ID so Email rows can reference it via
mailboxPath consistently with the IMAP convention.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas Güttler
2026-04-19 16:15:34 +02:00
co-authored by Claude Sonnet 4.6
parent 0054322068
commit f580cd0197
3 changed files with 339 additions and 8 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ extract `apiUrl`, primary `accountId`, and capabilities. Store nothing extra in
DB (re-fetch session on start). Provide a `call(methodCalls)` helper that POSTs to
`apiUrl` and decodes responses.
### Step 4 — JMAP Mailbox sync `[ ]`
### Step 4 — JMAP Mailbox sync `[x]`
Implement `syncMailboxes(accountId)` for JMAP: