Exclude contracts with trump and president in the name
This commit is contained in:
parent
5efe5e56f5
commit
5dcbf6e05d
|
@ -42,7 +42,13 @@ async function sendTrendingMarketsEmailsToAllUsers() {
|
|||
const privateUsersToSendEmailsTo = privateUsers.filter((user) => {
|
||||
return !user.unsubscribedFromWeeklyTrendingEmails
|
||||
})
|
||||
const trendingContracts = await getTrendingContracts()
|
||||
const trendingContracts = (await getTrendingContracts()).filter(
|
||||
(contract) =>
|
||||
!(
|
||||
contract.question.toLowerCase().includes('trump') &&
|
||||
contract.question.toLowerCase().includes('president')
|
||||
)
|
||||
)
|
||||
for (const privateUser of privateUsersToSendEmailsTo) {
|
||||
if (!privateUser.email) {
|
||||
log(`No email for ${privateUser.username}`)
|
||||
|
|
Loading…
Reference in New Issue
Block a user