diff --git a/PLAN.md b/PLAN.md index b4f11b3e..d9c39e9e 100644 --- a/PLAN.md +++ b/PLAN.md @@ -46,6 +46,13 @@ event get the link in their invitation, and the event popover already shows a to load event" and no RSVP buttons, and Google Calendar wouldn't import the file. A bare `CONFERENCE;VALUE=URI:` works, so we write only that. +- [x] Invitation updates: start a new event's invitation at `SEQUENCE:0`, + raise `SEQUENCE` at most once per save (and only for a change of + date, time or recurrence), and set `DTSTAMP` to the time of saving, + so that mail apps can tell an update from an invitation they've + already seen. `gcal_event_prepare_to_save()` does this; the setters + still commit EDS's sequence, because EDS won't clone a component with + a raise pending. - [x] Reading: detect Jitsi links in existing events (`CONFERENCE`, description and location) so that the editor shows "conference added" rather than offering to add a second one, and so that the popover's Join @@ -59,5 +66,8 @@ event get the link in their invitation, and the event popover already shows a - [x] Accessibility and translation: labels and tooltips are translatable and the new widgets are reachable by keyboard and screen reader. - [x] Docs: describe the feature in `README.md`, and add a `NEWS` entry. -- [ ] Test by hand on a Core calendar: add a conference, invite someone, - and check the invitation email and the Join button both open the room. +- [x] Test by hand on a Core calendar: add a conference, invite someone, + and check the invitation email. Invitations with a conference load, + with RSVP buttons, in both Gmail and Thunderbird. +- [ ] Check by hand that the popover's Join button opens the room + ([TEST.md](TEST.md) 4.7). diff --git a/TEST.md b/TEST.md index f70212ed..251eeea8 100644 --- a/TEST.md +++ b/TEST.md @@ -24,7 +24,7 @@ the Gitea Actions workflow before it publishes anything. | --- | --- | | `federated-core` | Finding the Core of a CalDAV host from CoreDesktop's `cores/*.conf` and older `core.conf`; skipping incomplete files; the Core's Jitsi server | | `jitsi` | Room names; recognizing Jitsi room links; finding an event's conference; adding and removing the link in the description | -| `event` | Events, including organizer, attendees and `CONFERENCE` properties surviving a round trip through iCalendar text | +| `event` | Events, including organizer, attendees and `CONFERENCE` properties surviving a round trip through iCalendar text; `CONFERENCE` written without `FEATURE` or `LABEL`; `SEQUENCE` and `DTSTAMP` on saving, and cloning an event right after its time changed | | `event-attendee` | Attendees and their roles | | `utils` | Helpers, including finding Google Meet, Teams and Jitsi links in descriptions | | `search`, `server`, `discoverer`, `range`, `range-tree`, `event-list`, `daylight-saving`, `internals` | GNOME Calendar's own tests | @@ -49,7 +49,10 @@ You need: should be a file in `~/.config/coredesktop/cores/`, and the Core's Nextcloud calendars should be in GNOME Online Accounts. - A second email address that you can read, ideally in a different mail app - (e.g. Gmail or Thunderbird), to receive invitations. + (e.g. Gmail or Thunderbird), to receive invitations. Test with a Gmail + address too: Gmail is the strictest about invitations. Invite the Gmail + address itself, not an address forwarded to it, or Gmail shows "Unable to + load event" whatever the invitation says. - A calendar that isn't on a Core, e.g. a local "On This Computer" calendar. - A read-only calendar, e.g. a subscribed holidays calendar. @@ -88,8 +91,10 @@ The rest of the app is GNOME Calendar's. Check that it still works. dates. → Events show on the right days and times. 2.2. Create an event with Quick Add (click an empty day), then one with the - full editor. Edit them, then delete them. - → Each change appears on the Core's Nextcloud calendar (check in the + full editor, changing its start and end times a few times before + saving. Edit them, then delete them. + → The app doesn't crash. + Each change appears on the Core's Nextcloud calendar (check in the browser), and the deleted events are gone from it. 2.3. Create an event that repeats weekly. Edit one occurrence with "This @@ -112,9 +117,12 @@ The rest of the app is GNOME Calendar's. Check that it still works. 3.2. Make an event on a calendar that isn't on a Core. → There's no Invite by Email row. -3.3. On a Core calendar, invite your second address and save. - → You're the organizer. The second address gets an invitation email - from the Core, which it can accept. +3.3. On a Core calendar, invite your second address, change the event's + time a few times, and save. + → You're the organizer. The second address gets one email, titled + "Invitation:" rather than "Invitation updated:", which it can accept. + Its attached `event.ics` has `SEQUENCE:0`. Gmail shows a card with + Yes, No and Maybe above the message. 3.4. Accept with the **Accept** link in the invitation email's text. → After the next sync, the event on your calendar shows the reply. The @@ -125,10 +133,19 @@ The rest of the app is GNOME Calendar's. Check that it still works. Nextcloud Mail's Accept at the top of the message, or Thunderbird's or Evolution's invitation bar. Or import the attached `event.ics` into its calendar. - → The event is on the second address's calendar too. + → The event is on the second address's calendar too. If that mail app + also has your Core calendar, which already holds the event, it says the + event has already been processed and offers no Accept. That's expected: + use a mail app or account without the Core calendar. 3.6. Change the event's time and save. - → The second address gets an update. + → The second address gets an update. Its `event.ics` has a `SEQUENCE` + one higher than before and a newer `DTSTAMP`, and the mail app updates + the event rather than saying it's already been processed. + +3.6a. Change only the title and save. + → The update keeps the same `SEQUENCE`, with a newer `DTSTAMP`. The + mail apps still take it as an update. 3.7. Remove the attendee and save, or delete the event. → The second address gets a cancellation. @@ -162,7 +179,9 @@ The rest of the app is GNOME Calendar's. Check that it still works. 4.6. Invite your second address and save. → The invitation email shows the link in its description. The attached - `event.ics` has a `CONFERENCE` line with the link. + `event.ics` has the line `CONFERENCE;VALUE=URI:`, with no + `FEATURE` or `LABEL` parameters. Gmail shows Yes, No and Maybe, not + "Unable to load event". 4.7. Open the event's popover in the calendar. → There's a **Join** button that opens the room. If the event has a @@ -247,6 +266,28 @@ LANGUAGE=de GSETTINGS_SCHEMA_DIR=_build/data ./_build/src/federated-calendar old one with `pkill -f federated-calendar` before opening it again. → The new version installs and opens, with the new features. +## Checking an invitation's iCalendar + +When a mail app shows an invitation without Accept or Yes / No / Maybe, look +at the `event.ics` that Nextcloud attached: + +- **Get it:** in Gmail, the message's ⋮ menu → **Download message**; in + Thunderbird, **File → Save As**. The `text/calendar` part is base64; save + the attachment or decode it. +- **Check it with Google's parser:** import the `.ics` in Google Calendar, + Settings → Import & export. "Imported 0 out of 0 events" means Google + can't read the file at all, which is why Gmail says "Unable to load + event". To find the cause, import copies that each change one thing. + That's how we found that Google rejects `FEATURE=AUDIO,VIDEO` on + `CONFERENCE`. +- **What the mail apps compare:** an invitation's `UID` matches it to an + event the reader already has. A higher `SEQUENCE`, or the same `SEQUENCE` + with a newer `DTSTAMP`, makes it an update; otherwise Thunderbird says it + has already been processed. +- **What's fine:** Nextcloud sends the file with bare LF line endings, not + the CRLF that RFC 5545 asks for, and in our time zone as `US/Mountain`. + Gmail and Thunderbird accept both. + ## Before telling people about a release - [ ] The automated tests pass, with and without `-Dfederated_core`.