Checkpoint: Correction du bug d'importation des invitations Outlook (ICS) - ajout de l'encodage UTF-8 explicite et des en-têtes corrects pour les pièces jointes calendrier

This commit is contained in:
Manus
2026-02-26 09:42:34 -05:00
parent 35eb0e78f8
commit 77e5544a90
2 changed files with 11 additions and 3 deletions

View File

@@ -109,7 +109,7 @@ export async function sendInscriptionConfirmation(params: {
// Générer une invitation ICS pour chaque date
const attachments = isConfirmed ? params.dates.map((date, index) => ({
filename: `invitation_date_${date.ordre}.ics`,
content: generateFormationICS({
content: Buffer.from(generateFormationICS({
formationNom: params.formationNom,
sessionNom: `${params.sequenceNom} - Date ${date.ordre}`,
dateDebut: date.dateDebut,
@@ -118,8 +118,8 @@ export async function sendInscriptionConfirmation(params: {
apprenantNom: params.apprenantNom,
apprenantPrenom: params.apprenantPrenom,
apprenantEmail: params.apprenantEmail,
}),
contentType: 'text/calendar',
}), 'utf-8'),
contentType: 'text/calendar; charset=utf-8; method=REQUEST',
})) : undefined;
// Préparer les variables pour le remplacement (avec alias pour compatibilité)