修复gmail附件和回复编辑器图片不显示
This commit is contained in:
@@ -25,7 +25,8 @@ export async function email(message, env, ctx) {
|
||||
forwardStatus,
|
||||
forwardEmail,
|
||||
ruleEmail,
|
||||
ruleType
|
||||
ruleType,
|
||||
r2Domain
|
||||
} = await settingService.query({ env });
|
||||
|
||||
if (receive === settingConst.receive.CLOSE) {
|
||||
@@ -45,8 +46,6 @@ export async function email(message, env, ctx) {
|
||||
|
||||
const email = await PostalMime.parse(content);
|
||||
|
||||
console.log(email)
|
||||
|
||||
const toName = email.to.find(item => item.address === message.to)?.name || '';
|
||||
|
||||
const params = {
|
||||
@@ -82,13 +81,12 @@ export async function email(message, env, ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
let emailRow = await emailService.receive({ env }, params, cidAttachments);
|
||||
let emailRow = await emailService.receive({ env }, params, cidAttachments, r2Domain);
|
||||
|
||||
attachments.forEach(attachment => {
|
||||
attachment.emailId = emailRow.emailId;
|
||||
attachment.userId = emailRow.userId;
|
||||
attachment.accountId = emailRow.accountId;
|
||||
attachment.type = attachment.contentId ? attConst.type.EMBED : attConst.type.ATT;
|
||||
});
|
||||
|
||||
if (attachments.length > 0 && env.r2) {
|
||||
|
||||
Reference in New Issue
Block a user