From 41b5dd2e381cd915681eb52d14523e7d1067451c Mon Sep 17 00:00:00 2001 From: James Grugett Date: Tue, 1 Mar 2022 17:25:19 -0800 Subject: [PATCH] Don't send answer emails if the submitter is also the market creator --- functions/src/emails.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functions/src/emails.ts b/functions/src/emails.ts index 00696186..0ded7b7d 100644 --- a/functions/src/emails.ts +++ b/functions/src/emails.ts @@ -223,6 +223,10 @@ export const sendNewAnswerEmail = async ( ) => { // Send to just the creator for now. const { creatorId: userId } = contract + + // Don't send the creator's own answers. + if (answer.userId === userId) return + const privateUser = await getPrivateUser(userId) if ( !privateUser ||