diff --git a/functions/src/reset-weekly-emails-flag.ts b/functions/src/reset-weekly-emails-flag.ts index fc6b396a..5a71b65b 100644 --- a/functions/src/reset-weekly-emails-flag.ts +++ b/functions/src/reset-weekly-emails-flag.ts @@ -4,7 +4,7 @@ import { getAllPrivateUsers } from './utils' export const resetWeeklyEmailsFlag = functions .runWith({ secrets: ['MAILGUN_KEY'] }) - // every Monday at 1 am PT (UTC -07:00) ( 12 hours before the emails will be sent) + // every Monday at 12 am PT (UTC -07:00) ( 12 hours before the emails will be sent) .pubsub.schedule('0 7 * * 1') .timeZone('Etc/UTC') .onRun(async () => { diff --git a/functions/src/unsubscribe.ts b/functions/src/unsubscribe.ts index 4db91539..da7b507f 100644 --- a/functions/src/unsubscribe.ts +++ b/functions/src/unsubscribe.ts @@ -69,6 +69,10 @@ export const unsubscribe: EndpointDefinition = { res.send( `${name}, you have been unsubscribed from market answer emails on Manifold Markets.` ) + else if (type === 'weekly-trending') + res.send( + `${name}, you have been unsubscribed from weekly trending emails on Manifold Markets.` + ) else res.send(`${name}, you have been unsubscribed.`) }, } diff --git a/functions/src/weekly-markets-emails.ts b/functions/src/weekly-markets-emails.ts index c7331dae..a20e40a2 100644 --- a/functions/src/weekly-markets-emails.ts +++ b/functions/src/weekly-markets-emails.ts @@ -10,7 +10,7 @@ import { DAY_MS } from '../../common/util/time' export const weeklyMarketsEmails = functions .runWith({ secrets: ['MAILGUN_KEY'] }) // every minute on Monday for an hour at 12pm PT (UTC -07:00) - .pubsub.schedule('* 18 * * 1') + .pubsub.schedule('* 19 * * 1') .timeZone('Etc/UTC') .onRun(async () => { await sendTrendingMarketsEmailsToAllUsers()