From e35c0b3b526d029d571e6172c0ef28405fa9be25 Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Mon, 12 Sep 2022 14:36:54 -0600 Subject: [PATCH] Only notify followers of new public markets --- functions/src/create-notification.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/functions/src/create-notification.ts b/functions/src/create-notification.ts index 03bbe8b5..c9f3ff8f 100644 --- a/functions/src/create-notification.ts +++ b/functions/src/create-notification.ts @@ -162,8 +162,9 @@ export const createNotification = async ( sourceUpdateType === 'created' && sourceContract ) { - await notifyUsersFollowers(userToReasonTexts) - notifyTaggedUsers(userToReasonTexts, recipients ?? []) + if (sourceContract.visibility === 'public') + await notifyUsersFollowers(userToReasonTexts) + await notifyTaggedUsers(userToReasonTexts, recipients ?? []) return await sendNotificationsIfSettingsPermit(userToReasonTexts) } else if ( sourceType === 'contract' &&