diff --git a/website/client/components/settings/notifications.vue b/website/client/components/settings/notifications.vue index 2b4966a8cc..dfc6dfb964 100644 --- a/website/client/components/settings/notifications.vue +++ b/website/client/components/settings/notifications.vue @@ -60,6 +60,7 @@ export default { 'weeklyRecaps', 'onboarding', 'majorUpdates', + 'subscriptionReminders', ]), // list of email-only notifications onlyEmailsIds: Object.freeze([ @@ -67,6 +68,7 @@ export default { 'importantAnnouncements', 'weeklyRecaps', 'onboarding', + 'subscriptionReminders', ]), }; }, diff --git a/website/common/locales/en/settings.json b/website/common/locales/en/settings.json index b297a275d2..07a57a5cb1 100644 --- a/website/common/locales/en/settings.json +++ b/website/common/locales/en/settings.json @@ -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!)", "onboarding": "Guidance with setting up your Habitica account", "majorUpdates": "Important announcements", + "subscriptionReminders": "Subscriptions Reminders", "questStarted": "Your Quest has Begun", "invitedQuest": "Invited to Quest", "kickedGroup": "Kicked from group", diff --git a/website/server/models/subscriptionPlan.js b/website/server/models/subscriptionPlan.js index c26f03bd6a..aaf2cbf148 100644 --- a/website/server/models/subscriptionPlan.js +++ b/website/server/models/subscriptionPlan.js @@ -15,6 +15,7 @@ export let schema = new mongoose.Schema({ extraMonths: {$type: Number, default: 0}, gemsBought: {$type: Number, default: 0}, 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 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. diff --git a/website/server/models/user/schema.js b/website/server/models/user/schema.js index e411bfb437..a1060f94fd 100644 --- a/website/server/models/user/schema.js +++ b/website/server/models/user/schema.js @@ -481,6 +481,7 @@ let schema = new Schema({ weeklyRecaps: {$type: Boolean, default: true}, onboarding: {$type: Boolean, default: true}, majorUpdates: {$type: Boolean, default: true}, + subscriptionReminders: {$type: Boolean, default: true}, }, pushNotifications: { unsubscribeFromAll: {$type: Boolean, default: false},