fix: store event organizer as owner-only to prevent duplicate ORGANIZER/ATTENDEE

This commit is contained in:
Linus Rath
2026-07-09 13:45:04 +02:00
parent 60a1cc670c
commit e933800792
3 changed files with 18 additions and 3 deletions
+2 -2
View File
@@ -282,7 +282,7 @@ describe('buildParticipantMap', () => {
expect(org).toBeDefined();
expect(org!.name).toBe('Alice');
expect(org!.email).toBe('alice@example.com');
expect(org!.roles).toEqual({ owner: true, attendee: true });
expect(org!.roles).toEqual({ owner: true });
expect(org!.participationStatus).toBe('accepted');
expect(org!.scheduleAgent).toBe('server');
// sendTo is retired in draft-ietf-calext-jscalendarbis; the scheduling
@@ -312,7 +312,7 @@ describe('buildParticipantMap', () => {
expect(Object.keys(map)).toHaveLength(1);
const org = Object.values(map)[0];
expect(org).toBeDefined();
expect(org.roles).toEqual({ owner: true, attendee: true });
expect(org.roles).toEqual({ owner: true });
});
it('sets @type to Participant for all entries', () => {
+4 -1
View File
@@ -115,7 +115,10 @@ export function buildParticipantMap(
name: organizer.name,
email: organizer.email,
calendarAddress: `mailto:${organizer.email}`,
roles: { owner: true, attendee: true },
// owner only, NOT attendee: with roles.attendee set, Stalwart's server-side
// scheduling emits the organizer as an ATTENDEE line in addition to the
// ORGANIZER line, so the recipient sees the organizer listed twice.
roles: { owner: true },
participationStatus: 'accepted',
scheduleAgent: 'server',
expectReply: false,