Email subs reminders release (#11216)

* add subscriptions reminders emails

* add field to record the last sub reminder
This commit is contained in:
Matteo Pagliazzi
2019-06-10 22:37:30 +02:00
committed by GitHub
parent b9d9a17aca
commit 3c31945524
4 changed files with 5 additions and 0 deletions

View File

@@ -60,6 +60,7 @@ export default {
'weeklyRecaps', 'weeklyRecaps',
'onboarding', 'onboarding',
'majorUpdates', 'majorUpdates',
'subscriptionReminders',
]), ]),
// list of email-only notifications // list of email-only notifications
onlyEmailsIds: Object.freeze([ onlyEmailsIds: Object.freeze([
@@ -67,6 +68,7 @@ export default {
'importantAnnouncements', 'importantAnnouncements',
'weeklyRecaps', 'weeklyRecaps',
'onboarding', 'onboarding',
'subscriptionReminders',
]), ]),
}; };
}, },

View File

@@ -125,6 +125,7 @@
"weeklyRecaps": "Summaries of your account activity in the past week (Note: this is currently disabled due to performance issues, but we hope to have this back up and sending e-mails again soon!)", "weeklyRecaps": "Summaries of your account activity in the past week (Note: this is currently disabled due to performance issues, but we hope to have this back up and sending e-mails again soon!)",
"onboarding": "Guidance with setting up your Habitica account", "onboarding": "Guidance with setting up your Habitica account",
"majorUpdates": "Important announcements", "majorUpdates": "Important announcements",
"subscriptionReminders": "Subscriptions Reminders",
"questStarted": "Your Quest has Begun", "questStarted": "Your Quest has Begun",
"invitedQuest": "Invited to Quest", "invitedQuest": "Invited to Quest",
"kickedGroup": "Kicked from group", "kickedGroup": "Kicked from group",

View File

@@ -15,6 +15,7 @@ export let schema = new mongoose.Schema({
extraMonths: {$type: Number, default: 0}, extraMonths: {$type: Number, default: 0},
gemsBought: {$type: Number, default: 0}, gemsBought: {$type: Number, default: 0},
mysteryItems: {$type: Array, default: () => []}, mysteryItems: {$type: Array, default: () => []},
lastReminderDate: Date, // indicates the last time a subscription reminder was sent
lastBillingDate: Date, // Used only for Amazon Payments to keep track of billing date lastBillingDate: Date, // Used only for Amazon Payments to keep track of billing date
additionalData: mongoose.Schema.Types.Mixed, // Example for Google: {'receipt': 'serialized receipt json', 'signature': 'signature string'} additionalData: mongoose.Schema.Types.Mixed, // Example for Google: {'receipt': 'serialized receipt json', 'signature': 'signature string'}
nextPaymentProcessing: Date, // indicates when the queue server should process this subscription again. nextPaymentProcessing: Date, // indicates when the queue server should process this subscription again.

View File

@@ -481,6 +481,7 @@ let schema = new Schema({
weeklyRecaps: {$type: Boolean, default: true}, weeklyRecaps: {$type: Boolean, default: true},
onboarding: {$type: Boolean, default: true}, onboarding: {$type: Boolean, default: true},
majorUpdates: {$type: Boolean, default: true}, majorUpdates: {$type: Boolean, default: true},
subscriptionReminders: {$type: Boolean, default: true},
}, },
pushNotifications: { pushNotifications: {
unsubscribeFromAll: {$type: Boolean, default: false}, unsubscribeFromAll: {$type: Boolean, default: false},