Don't send answer emails if the submitter is also the market creator

This commit is contained in:
James Grugett 2022-03-01 17:25:19 -08:00
parent 1fe63c75fe
commit 41b5dd2e38

View File

@ -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 ||