@peopl-health/nexus 5.56.0-dev.8569 → 5.56.0-dev.8571

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.
@@ -96,7 +96,13 @@ async function findIntakePatientRecordId(code) {
96
96
  }
97
97
 
98
98
  async function writeUnresolvedRequest({ code, trace, question, details, resolutionAttempted = false, forDoctorOffice = false, category = null, urgency = null, replacesClosedTask = false }) {
99
- const fingerprint = createHash('sha1').update(`${code}\n${category || ''}\n${question || ''}`).digest('hex');
99
+ // Everything that changes where the request goes or how fast, so an upgrade is never suppressed
100
+ // as a repeat. Free text is left out on purpose: a reworded retry of the same ask is a repeat.
101
+ // Serialized, not joined: question carries newlines, and a delimiter it can contain is one a
102
+ // future field could collide across.
103
+ const fingerprint = createHash('sha1')
104
+ .update(JSON.stringify([code, category || null, question || null, urgency || null, Boolean(forDoctorOffice)]))
105
+ .digest('hex');
100
106
  let recordId = null;
101
107
  const duplicate = !replacesClosedTask && await recentUnresolvedCache.get(code) === fingerprint;
102
108
  const written = await auditedWrite({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peopl-health/nexus",
3
- "version": "5.56.0-dev.8569",
3
+ "version": "5.56.0-dev.8571",
4
4
  "description": "Core messaging and assistant library for WhatsApp communication platforms",
5
5
  "keywords": [
6
6
  "whatsapp",