mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
fix(Slack): improve subscription notif logic
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user