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,
+12
View File
@@ -6223,6 +6223,7 @@
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"optional": true,
@@ -7903,6 +7904,17 @@
}
}
},
"node_modules/next-intl/node_modules/@swc/helpers": {
"version": "0.5.23",
"resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.23.tgz",
"integrity": "sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw==",
"license": "Apache-2.0",
"optional": true,
"peer": true,
"dependencies": {
"tslib": "^2.8.0"
}
},
"node_modules/next/node_modules/postcss": {
"version": "8.4.31",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",