Merge branch 'release' into develop

This commit is contained in:
SabreCat 2021-12-23 15:29:26 -06:00
commit a301186432
4 changed files with 7 additions and 3 deletions

2
package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "habitica",
"version": "4.215.0",
"version": "4.215.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,7 +1,7 @@
{
"name": "habitica",
"description": "A habit tracker app which treats your goals like a Role Playing Game.",
"version": "4.215.0",
"version": "4.215.1",
"main": "./website/server/index.js",
"dependencies": {
"@babel/core": "^7.16.0",

View file

@ -293,6 +293,7 @@ async function createSubscription (data) {
paymentMethod: data.paymentMethod,
months: group ? 1 : months,
groupId,
autoRenews,
});
}

View file

@ -182,6 +182,7 @@ function sendSubscriptionNotification ({
paymentMethod,
months,
groupId,
autoRenews,
}) {
if (SKIP_SUB_METHOD) {
return;
@ -194,8 +195,10 @@ function sendSubscriptionNotification ({
text = `${buyer.name} ${buyer.id} ${buyer.email} bought a ${months}-month gift subscription for ${recipient.name} ${recipient.id} ${recipient.email}${promoString} using ${paymentMethod} on ${timestamp}`;
} else if (groupId) {
text = `${buyer.name} ${buyer.id} ${buyer.email} bought a 1-month recurring group-plan for ${groupId} using ${paymentMethod} on ${timestamp}`;
} else {
} else if (autoRenews) {
text = `${buyer.name} ${buyer.id} ${buyer.email} bought a ${months}-month recurring subscription using ${paymentMethod} on ${timestamp}`;
} else {
text = `${buyer.name} ${buyer.id} ${buyer.email} bought a ${months}-month non-recurring subscription using ${paymentMethod} on ${timestamp}`;
}
subscriptionSlack