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,
|
||||
|
||||
Reference in New Issue
Block a user