CalendarEvent/get omits recurrenceRule and recurrenceOverrides for synthetic instances instead of returning null

Issue Description

When CalendarEvent/get returns a server-expanded synthetic recurrence instance, explicitly requested recurrenceRule and recurrenceOverrides properties are omitted.

The JMAP Calendars draft requires these properties to:

“MUST be returned as null if requested for such an event.”

Expected Behavior

For a synthetic recurrence instance, explicitly requested recurrenceRule and recurrenceOverrides properties should both be present with a value of null.

Actual Behavior

Stalwart omits the requested properties entirely from the returned CalendarEvent.

Reproduction Steps

  1. Create a recurring CalendarEvent.
  2. Obtain a synthetic occurrence id using CalendarEvent/query with expandRecurrences: true.
  3. Fetch that id using CalendarEvent/get and explicitly request id, recurrenceRule, and recurrenceOverrides.
  4. Observe that recurrenceRule and recurrenceOverrides are absent rather than null.

Relevant Log Output

N/A

Stalwart Version

v0.16.x

Installation Method

Built from source

Database Backend

RocksDB

Blob Storage

RocksDB

Search Engine

Internal

Directory Backend

Internal

I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.

on

I have searched this support forum (open and closed topics) and confirm this is not a duplicate.

on

I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.

on

This is a code-level bug report rather than a docs/config question, so I’ll note that a human maintainer will need to confirm and address it directly in the source.

This isn’t covered in the current docs. A community member or staff member will follow up.

try harder, @helpbot :joy:

Fixed in v0.16.22 (yet to be released).