From 0a8051870a4c91a9896878a37d301b5a23677e62 Mon Sep 17 00:00:00 2001 From: Camille Moussu <66134347+Eriikah@users.noreply.github.com> Date: Fri, 30 Jan 2026 15:51:04 +0100 Subject: [PATCH] [#469] fixed mail to attendees string (#484) --- __test__/features/Events/EventDisplay.test.tsx | 4 ++-- src/features/Events/EventDisplayPreview.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 ?? "")}` ) } >