diff --git a/backend/src/app.ts b/backend/src/app.ts index 40c9de5..f7d9f26 100644 --- a/backend/src/app.ts +++ b/backend/src/app.ts @@ -854,6 +854,14 @@ const getFlockPalLogoAttachment = () => { }; }; +const getEmailTrackPatternAttachment = () => ({ + filename: 'flockpal-x-pattern.svg', + content: ``, + contentType: 'image/svg+xml', + cid: 'flockpal-x-pattern', + contentDisposition: 'inline' as const, +}); + const parseDataImage = (dataUrl: string) => { const match = /^data:(image\/[a-zA-Z0-9.+-]+);base64,(.+)$/.exec(dataUrl); if (!match) { @@ -1142,6 +1150,7 @@ const sendBirdMilestoneReminderNotification = async ({ const copy = buildBirdMilestoneReminderCopy(reminder); const attachments: NonNullable = []; const logoAttachment = getFlockPalLogoAttachment(); + const trackPatternAttachment = getEmailTrackPatternAttachment(); const uploadedBirdPhoto = reminder.photo_data_url ? parseDataImage(reminder.photo_data_url) : null; const defaultBirdPhoto = uploadedBirdPhoto ? null : getDefaultBirdPhotoAttachment(); const birdPhotoCid = uploadedBirdPhoto ? 'bird-photo' : defaultBirdPhoto ? defaultBirdPhoto.cid : ''; @@ -1149,6 +1158,7 @@ const sendBirdMilestoneReminderNotification = async ({ if (logoAttachment) { attachments.push(logoAttachment); } + attachments.push(trackPatternAttachment); if (uploadedBirdPhoto) { attachments.push({ @@ -1191,7 +1201,10 @@ const sendBirdMilestoneReminderNotification = async ({ text: lines.join('\n'), attachments, html: ` - + + + + ${ @@ -1218,6 +1231,9 @@ const sendBirdMilestoneReminderNotification = async ({ + + + `, });