JMAP: imported invitations save RSVP status but send no iTIP REPLY

Issue Description

When an external invitation is imported through JMAP with sendSchedulingMessages: false, subsequently accepting, tentatively accepting, or declining it with sendSchedulingMessages: true saves the participant status successfully but generates no reply to the organizer.

Expected Behavior

The participant status is saved and an iTIP METHOD:REPLY is generated for the external organizer.

Actual Behavior

All three updates return success, and the requested status is stored. No reply is generated. Each update logs the following error at DEBUG level:

DEBUG iTIP message error (calendar.itip-message-error)
reason = “Not the organizer of the event”

CalDAV confirms that these imported events have no schedule-tag.

As a control, creating an already-accepted event with sendSchedulingMessages: true generates an iTIP reply and a scheduling tag. Subsequently changing that control event to tentative generates another reply.

These control messages were generated inside the network-isolated instance; external delivery was not tested.

Reproduction Steps

  1. Import a future event through CalendarEvent/set with sendSchedulingMessages: false.
  2. Set organizerCalendarAddress to an external address that is not an alias of the local account.
  3. Include the local attendee using calendarAddress, initially with participationStatus: “needs-action”.
  4. Fetch the event and identify the returned participant ID for the local attendee.
  5. Update that participant’s status:

{
“using”: [
“urn:ietf:params:jmap:core”,
“urn:ietf:params:jmap:calendars”
],
“methodCalls”: [
[
“CalendarEvent/set”,
{
“accountId”: “ACCOUNT_ID”,
“sendSchedulingMessages”: true,
“update”: {
“EVENT_ID”: {
“participants/PARTICIPANT_ID/participationStatus”: “accepted”
}
}
},
“rsvp”
]
]
}

  1. Read the event back and inspect scheduling logs.
  2. Repeat with separate imported events using tentative and declined.

The event must remain in the future and must not be a draft.

Relevant Log Output

DEBUG iTIP message error (calendar.itip-message-error)
reason = “Not the organizer of the event”

Stalwart Version

v1.x

Installation Method

Docker

Database Backend

PostgreSQL

Blob Storage

Filesystem

Search Engine

Meilisearch

Directory Backend

LDAP

Additional Context

Root cause identified in the code
In the existing-event update path, scheduling dispatch depends on whether schedule_tag exists:

let result = if new_calendar_event.schedule_tag.is_some() {
itip_update(…)
} else {
itip_create(…)
};

Importing without scheduling leaves the tag unset. A subsequent attendee RSVP therefore calls itip_create(), which rejects an external organizer with ItipError::NotOrganizer.

NotOrganizer is not classified as a JMAP error. The update handler logs it at DEBUG level, continues without scheduling messages, persists the participant status, and returns success.

The new-event creation path already handles NotOrganizer with an itip_attendee_create() fallback. The existing-event update path lacks equivalent attendee handling.

The update path needs to support attendee replies for imported events without scheduling tags, including subsequent RSVP changes.

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

Your diagnosis matches the source. I haven’t run your reproduction, but I read the code.

In crates/jmap/src/calendar_event/set.rs, the update path around line 1081 picks the scheduling function like this:

  • If schedule_tag is set, it calls itip_update.
  • If schedule_tag is not set, it calls itip_create.

An event imported with sendSchedulingMessages: false has no tag, so an attendee RSVP goes through itip_create. That function returns ItipError::NotOrganizer for an external organizer. The error isn’t classified as a JMAP error, so the handler logs it at DEBUG as calendar.itip-message-error and carries on. The participant status is saved and the call returns success.

The create path, around line 1881, handles this case. It catches NotOrganizer and falls back to itip_attendee_create. The update path has no equivalent fallback. That explains why your control event, created already accepted with scheduling on, does get replies.

I found no documentation that covers this behaviour. A fix would need the update path to fall back to attendee reply generation when the tag is missing and the local user is an attendee. A community or staff member will follow up on whether that is the intended change.

This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.

This is fixed and the fix ships in the next weekly Stalwart release. Your trace through the update path was spot on and made it quick to pin down.

An update to an event without a schedule tag always went through the organizer-side builder, which gave up with “Not the organizer of the event” when the organizer was external, so the new status was saved and nothing was sent. Updates without a tag now fall back to the attendee side and compare against the previous version of the event, so changing your participation status sends a REPLY to the organizer, while edits that don’t touch your RSVP (adding an alert, for example) send nothing. The event also gets a schedule tag on that first REPLY, so later status changes take the normal path. CalDAV had the same gap for a PUT that changes PARTSTAT on such an event, and that’s fixed too.

Invitations you’ve already answered won’t send anything retroactively, and saving the same status again won’t either, since the REPLY is only sent when the status changes. For those events, once you’re on the new release, change the status to something else and back (each change sends a REPLY, so the organizer ends up with your final answer).