fix: use calendarAddress/organizerCalendarAddress for scheduling, drop retired sendTo/replyTo #500
This commit is contained in:
@@ -522,13 +522,14 @@ export function EventModal({
|
||||
{ name: organizerName, email: organizerEmail },
|
||||
effectiveAttendees
|
||||
) as Record<string, CalendarParticipant>;
|
||||
data.replyTo = { imip: `mailto:${organizerEmail}` };
|
||||
// Stalwart (calcard) derives the iCalendar ORGANIZER property solely from
|
||||
// organizerCalendarAddress; without it no ORGANIZER is emitted and iTIP
|
||||
// scheduling is silently skipped (NoSchedulingInfo), so no invites are sent.
|
||||
// The RFC 8984 replyTo property is retired in jscalendarbis and ignored.
|
||||
data.organizerCalendarAddress = `mailto:${organizerEmail}`;
|
||||
} else if (effectiveAttendees.length === 0 && event?.participants) {
|
||||
data.participants = null;
|
||||
// Also clear the retired replyTo that older releases (<= 1.7.6) wrote.
|
||||
data.replyTo = null;
|
||||
data.organizerCalendarAddress = null;
|
||||
}
|
||||
|
||||
@@ -540,7 +540,9 @@ describe('CalendarInvitationBanner', () => {
|
||||
mocks.clientMock,
|
||||
'event-8',
|
||||
expect.objectContaining({
|
||||
replyTo: { imip: 'mailto:organizer@example.com' },
|
||||
// The stored event lacks an ORGANIZER, so the RSVP repair writes
|
||||
// organizerCalendarAddress (replyTo is retired in jscalendarbis).
|
||||
organizerCalendarAddress: 'mailto:organizer@example.com',
|
||||
participants: expect.objectContaining({
|
||||
attendee: expect.objectContaining({
|
||||
participationStatus: 'accepted',
|
||||
|
||||
@@ -582,7 +582,12 @@ export function CalendarInvitationBanner({ email }: CalendarInvitationBannerProp
|
||||
} else {
|
||||
await updateEvent(client, eventForRsvp.id, {
|
||||
participants: repairedParticipants,
|
||||
replyTo: replyToForRsvp ?? undefined,
|
||||
// Stalwart routes the iTIP REPLY via the stored ORGANIZER
|
||||
// (organizerCalendarAddress; the RFC 8984 replyTo is retired).
|
||||
// Only repair a missing organizer - attendees may not modify it.
|
||||
...(replyToForRsvp?.imip && !eventForRsvp.organizerCalendarAddress
|
||||
? { organizerCalendarAddress: replyToForRsvp.imip }
|
||||
: {}),
|
||||
}, true);
|
||||
setRsvpStatus(status);
|
||||
setActionNotice(t('rsvp_sent'));
|
||||
|
||||
Reference in New Issue
Block a user