fix: store event organizer as owner-only to prevent duplicate ORGANIZER/ATTENDEE
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Generated
+12
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user