Only notify followers of new public markets

This commit is contained in:
Ian Philips 2022-09-12 14:36:54 -06:00
parent 0af1ff112b
commit e35c0b3b52

View File

@ -162,8 +162,9 @@ export const createNotification = async (
sourceUpdateType === 'created' && sourceUpdateType === 'created' &&
sourceContract sourceContract
) { ) {
if (sourceContract.visibility === 'public')
await notifyUsersFollowers(userToReasonTexts) await notifyUsersFollowers(userToReasonTexts)
notifyTaggedUsers(userToReasonTexts, recipients ?? []) await notifyTaggedUsers(userToReasonTexts, recipients ?? [])
return await sendNotificationsIfSettingsPermit(userToReasonTexts) return await sendNotificationsIfSettingsPermit(userToReasonTexts)
} else if ( } else if (
sourceType === 'contract' && sourceType === 'contract' &&