add teamId to email events (#194)

This commit is contained in:
KM Koushik
2025-08-10 08:58:17 +10:00
committed by GitHub
parent 7ecb3d27a9
commit 46b2b64847
6 changed files with 27 additions and 1 deletions

View File

@@ -331,6 +331,7 @@ async function processContactEmail(jobData: CampaignEmailJob) {
data: {
error: "Contact email is suppressed. No email sent.",
},
teamId: emailConfig.teamId,
},
});

View File

@@ -403,6 +403,7 @@ async function executeEmail(job: QueueEmailJob) {
data: {
error: error.toString(),
},
teamId: email.teamId,
},
});
await db.email.update({

View File

@@ -132,6 +132,7 @@ export async function sendEmail(
data: {
error: "All TO recipients are suppressed. No emails to send.",
},
teamId,
},
});
@@ -260,6 +261,7 @@ export async function sendEmail(
data: {
error: error.toString(),
},
teamId,
},
});
await db.email.update({
@@ -327,6 +329,7 @@ export async function cancelEmail(emailId: string) {
data: {
emailId,
status: "CANCELLED",
teamId: email.teamId,
},
});
}
@@ -543,6 +546,7 @@ export async function sendBulkEmails(
data: {
error: "All TO recipients are suppressed. No emails to send.",
},
teamId,
},
});
@@ -733,6 +737,7 @@ export async function sendBulkEmails(
data: {
error: error.toString(),
},
teamId: email.email.teamId,
},
});
await db.email.update({

View File

@@ -249,6 +249,7 @@ export async function parseSesHook(data: SesEvent) {
emailId: email.id,
status: mailStatus,
data: mailData as any,
teamId: email.teamId,
},
});