From 9c98e95ca411016170469eafa5e88a9fe8fe8c71 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Tue, 16 Sep 2014 14:25:12 +0100 Subject: [PATCH] send cancelation email after 1 hour --- .../coffee/Features/Subscription/SubscriptionHandler.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/web/app/coffee/Features/Subscription/SubscriptionHandler.coffee b/services/web/app/coffee/Features/Subscription/SubscriptionHandler.coffee index c74e20a39e..105a9a4a0d 100644 --- a/services/web/app/coffee/Features/Subscription/SubscriptionHandler.coffee +++ b/services/web/app/coffee/Features/Subscription/SubscriptionHandler.coffee @@ -46,7 +46,9 @@ module.exports = emailOpts = to: user.email first_name: user.first_name - EmailHandler.sendEmail "canceledSubscription", emailOpts + ONE_HOUR_IN_MS = 1000 * 60 * 60 + setTimeout (-> EmailHandler.sendEmail "canceledSubscription", emailOpts + ), ONE_HOUR_IN_MS callback() else callback()