send market guide onboarding email after 96 hrs
This commit is contained in:
parent
379e736e51
commit
106dc232b8
|
@ -26,18 +26,12 @@ export const onCreateUser = functions
|
||||||
const followupSendTime = dayjs().add(48, 'hours').toString()
|
const followupSendTime = dayjs().add(48, 'hours').toString()
|
||||||
await sendPersonalFollowupEmail(user, privateUser, followupSendTime)
|
await sendPersonalFollowupEmail(user, privateUser, followupSendTime)
|
||||||
|
|
||||||
const day = dayjs().utc().day()
|
const guideSendTime = dayjs().add(96, 'hours').toString()
|
||||||
|
|
||||||
const skipInterestingMarkets =
|
|
||||||
// skip email if weekly email is about to go out
|
|
||||||
day === 0 || (day === 1 && dayjs().utc().hour() <= 19)
|
|
||||||
|
|
||||||
const guideSendTime = dayjs()
|
|
||||||
.add(skipInterestingMarkets ? 24 : 96, 'hours')
|
|
||||||
.toString()
|
|
||||||
await sendCreatorGuideEmail(user, privateUser, guideSendTime)
|
await sendCreatorGuideEmail(user, privateUser, guideSendTime)
|
||||||
|
|
||||||
if (skipInterestingMarkets) return
|
// skip email if weekly email is about to go out
|
||||||
|
const day = dayjs().utc().day()
|
||||||
|
if (day === 0 || (day === 1 && dayjs().utc().hour() <= 19)) return
|
||||||
|
|
||||||
const contracts = await getTrendingContracts()
|
const contracts = await getTrendingContracts()
|
||||||
const marketsSendTime = dayjs().add(24, 'hours').toString()
|
const marketsSendTime = dayjs().add(24, 'hours').toString()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user