-
Notifications
You must be signed in to change notification settings - Fork 4.2k
fix(worker,framework): email cid images fixes NV-6777 #9330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for dashboard-v2-novu-staging canceled.
|
cid: attachment.cid, | ||
disposition: attachment.disposition, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the attachments cid, disposition
was missing when passing this information to the providers :/
* Additional URL schemes to allow in src, href, and other URL attributes. | ||
* Including 'cid:' for Content-ID references used in email attachments. | ||
*/ | ||
allowedSchemes: sanitizeTypes.defaults.allowedSchemes.concat(['cid']), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the <img src="cid:..."
cid schema was not allowed during sanitization :/
return JSON.parse(compiledString); | ||
// repair the string to fix invalid JSON, it could happen in the case when the control value | ||
// has the escaped quotes like '\"foo\"' then compiled string is not valid JSON and parse will fail | ||
const repairedString = jsonrepair(compiledString); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the comment above explains the case well
attachments: options.attachments?.map((attachment) => ({ | ||
filename: attachment?.name, | ||
content: attachment.file, | ||
contentId: attachment.cid, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing in resend
f9c820e
to
0400d22
Compare
commit: |
What changed? Why was the change needed?
Fix failing email CID image attachments. I'll describe a couple of issues in the comments.
Screenshots