fix(Slack): improve subscription notif logic

This commit is contained in:
SabreCat
2021-12-22 14:58:15 -06:00
parent e2fd6a72c2
commit f2cfc2744d
2 changed files with 5 additions and 1 deletions

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