backend-manager 5.0.176 → 5.0.177
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
|
14
14
|
- `Fixed` for any bug fixes.
|
|
15
15
|
- `Security` in case of vulnerabilities.
|
|
16
16
|
|
|
17
|
+
# [5.0.177] - 2026-03-29
|
|
18
|
+
### Changed
|
|
19
|
+
- `payment-recovered` transition now sends email to internal team only — customer no longer receives a "Payment received" notification
|
|
20
|
+
|
|
17
21
|
# [5.0.176] - 2026-03-30
|
|
18
22
|
### Fixed
|
|
19
23
|
- Chargeblast `alert.created` events use `alertId` instead of `id` — normalizer now accepts either field
|
package/package.json
CHANGED
|
@@ -15,22 +15,27 @@ const moment = require('moment');
|
|
|
15
15
|
* @param {object} options.userDoc - User document data (passed as `to` — email.js extracts email/name and user template data)
|
|
16
16
|
* @param {object} options.assistant - Assistant instance
|
|
17
17
|
*/
|
|
18
|
-
function sendOrderEmail({ template, subject, categories, data, userDoc, assistant, copy, sender = 'orders' }) {
|
|
18
|
+
function sendOrderEmail({ template, subject, categories, data, userDoc, assistant, copy, internalOnly, sender = 'orders' }) {
|
|
19
19
|
const email = assistant.Manager.Email(assistant);
|
|
20
20
|
const uid = userDoc?.auth?.uid;
|
|
21
21
|
|
|
22
|
-
if (!userDoc?.auth?.email) {
|
|
22
|
+
if (!internalOnly && !userDoc?.auth?.email) {
|
|
23
23
|
assistant.error(`sendOrderEmail(): No email found for uid=${uid}, skipping`);
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
const brandContact = assistant.Manager.config?.brand?.contact;
|
|
28
|
+
const to = internalOnly
|
|
29
|
+
? { email: brandContact?.email, name: brandContact?.name || assistant.Manager.config?.brand?.name }
|
|
30
|
+
: userDoc;
|
|
31
|
+
|
|
27
32
|
email.send({
|
|
28
33
|
sender,
|
|
29
|
-
to
|
|
34
|
+
to,
|
|
30
35
|
subject,
|
|
31
36
|
template,
|
|
32
37
|
categories,
|
|
33
|
-
copy: copy !== false,
|
|
38
|
+
copy: internalOnly ? false : copy !== false,
|
|
34
39
|
data,
|
|
35
40
|
})
|
|
36
41
|
.then((result) => {
|
package/src/manager/events/firestore/payments-webhooks/transitions/subscription/payment-recovered.js
CHANGED
|
@@ -11,6 +11,7 @@ module.exports = async function ({ before, after, order, uid, userDoc, assistant
|
|
|
11
11
|
template: 'main/order/payment-recovered',
|
|
12
12
|
subject: `Payment received for order #${order?.id || ''}`,
|
|
13
13
|
categories: ['order/payment-recovered'],
|
|
14
|
+
internalOnly: true,
|
|
14
15
|
userDoc,
|
|
15
16
|
assistant,
|
|
16
17
|
data: {
|