Calendar: write shared events in the account that holds them #61

Merged
jcoffey-dev merged 1 commits from fix/shared-calendar-writes into main 2026-10-09 22:53:19 +00:00
1 Commits
Author SHA1 Message Date
jcoffey-dev 27df0a8bd6 Calendar: write shared events in the account that holds them
ci / node (pull_request) Skipped
ci / version (pull_request) Skipped
ci / docker-build (pull_request) Skipped
ci / publish (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 1m43s
ci / announce (pull_request) Skipped
Edit, delete, a reply and a single date of a shared series were all sent
to the reader's own account under the owner's event id (#49). Ids only
mean something inside their account and Stalwart's are short, so that
was notFound at best and at worst changed or deleted the reader's own,
unrelated event of the same id. New events couldn't go into a shared
calendar at all, even with write rights.

- An instance from a shared calendar carries its account, and is keyed
  by it, so it no longer shares a key with one of the reader's own
- getEvent, createEvent, updateEvent, destroyEvent and rsvp take that
  account (default: the reader's own); the occurrence lookup runs there
  too, and a shared delete clears the shared copy, not the reader's
- The popover, drag-to-move, the context menu (duplicate included) and
  the editor pass it through
- The editor offers shared calendars the reader may write to, named
  with whose they are; an existing event keeps to its own account,
  since JMAP has no moving an event between accounts

Port of coffey-labs/ihasmail#50, which fixes coffey-labs/ihasmail#49.

(cherry picked from commit 4b0a3dca6c0c5f45d3a1b0320975624487790d73)
2026-10-09 15:34:40 -07:00