@peopl-health/nexus 5.57.5 → 5.57.6
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.
|
@@ -46,11 +46,12 @@ function contentSignature(variables) {
|
|
|
46
46
|
return crypto.createHash('sha1').update(source).digest('hex').slice(0, 12);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
function buildSendClaimKey({ code, contentSid, variables, idempotencyKey } = {}) {
|
|
49
|
+
function buildSendClaimKey({ code, contactCode, contentSid, variables, idempotencyKey } = {}) {
|
|
50
50
|
if (idempotencyKey) return `idem:${idempotencyKey}`;
|
|
51
51
|
if (!code || !contentSid) return null;
|
|
52
52
|
const signature = contentSignature(variables);
|
|
53
|
-
|
|
53
|
+
const recipient = contactCode ? `${ensureWhatsAppFormat(code)}>${ensureWhatsAppFormat(contactCode)}` : ensureWhatsAppFormat(code);
|
|
54
|
+
return `tpl:${recipient}:${contentSid}${signature ? `:${signature}` : ''}`;
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
async function isCompletedClaim(key) {
|