diff --git a/__test__/features/Events/EventDisplay.test.tsx b/__test__/features/Events/EventDisplay.test.tsx index 26aeeb7..7dc3a6d 100644 --- a/__test__/features/Events/EventDisplay.test.tsx +++ b/__test__/features/Events/EventDisplay.test.tsx @@ -663,7 +663,7 @@ describe("Event Preview Display", () => { preloadedState.calendars.list["667037022b752d0026472254/cal1"].events[ "event1" ]; - const expectedUrl = `test/mailto/?uri=mailto:john@test.com?subject=Test%20Event`; + const expectedUrl = `test/mailto/?uri=mailto:john@test.com&subject=Test%20Event`; expect(mockOpen).toHaveBeenCalledWith(expectedUrl); }); @@ -734,7 +734,7 @@ describe("Event Preview Display", () => { fireEvent.click(emailButton); - const expectedUrl = `test/mailto/?uri=mailto:john@test.com?subject=Meeting%20%26%20Discussion%3F%20%23Important`; + const expectedUrl = `test/mailto/?uri=mailto:john@test.com&subject=Meeting%20%26%20Discussion%3F%20%23Important`; expect(mockOpen).toHaveBeenCalledWith(expectedUrl); }); diff --git a/src/features/Events/EventDisplayPreview.tsx b/src/features/Events/EventDisplayPreview.tsx index fe9726e..ae4f3ab 100644 --- a/src/features/Events/EventDisplayPreview.tsx +++ b/src/features/Events/EventDisplayPreview.tsx @@ -359,12 +359,12 @@ export default function EventPreviewModal({ window.open( - `${mailSpaUrl}/mailto/?uri=mailto:${attendees + `${mailSpaUrl}/mailto/?uri=mailto:${event.attendee .map((a) => a.cal_address) .filter((mail) => mail !== user.email) .join( "," - )}?subject=${encodeURIComponent(event.title ?? "")}` + )}&subject=${encodeURIComponent(event.title ?? "")}` ) } >