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
Owner

Same fix as coffey-labs/ihasmail#50 (for coffey-labs/ihasmail#49): changes to events in a shared calendar now go to the owner's account instead of your own.

Same fix as coffey-labs/ihasmail#50 (for coffey-labs/ihasmail#49): changes to events in a shared calendar now go to the owner's account instead of your own.
jcoffey-dev added 1 commit 2026-10-09 22:35:17 +00:00
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
27df0a8bd6
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)
Author
Owner

Tested this with two real accounts sharing a calendar, both with an event using the same id. Deleting the shared event from Bob's side now removes Alice's and leaves Bob's alone, and new events can go into the shared calendar too.

Tested this with two real accounts sharing a calendar, both with an event using the same id. Deleting the shared event from Bob's side now removes Alice's and leaves Bob's alone, and new events can go into the shared calendar too.
jcoffey-dev merged commit 35570dbcc4 into main 2026-10-09 22:53:19 +00:00
jcoffey-dev deleted branch fix/shared-calendar-writes 2026-10-09 22:53:19 +00:00
Sign in to join this conversation.