@peopl-health/nexus 5.60.0-dev.11094 → 5.60.0-dev.11095

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.
@@ -94,7 +94,10 @@ async function applySupportLight({
94
94
  const existing = await Model.findOne(query).lean();
95
95
  if (isHuman && (existing?.revision ?? null) !== reviewedRevision) return { light: existing, outcome: 'stale' };
96
96
  const change = nextLight(existing, { service, color, source });
97
- if (change.outcome === 'unchanged') return { light: existing, outcome: 'unchanged' };
97
+ if (change.outcome === 'unchanged') {
98
+ if (existing?.outbox?.length) await settleOutbox(Model, EventModel, existing);
99
+ return { light: existing, outcome: 'unchanged' };
100
+ }
98
101
  await flushOutbox(EventModel, existing);
99
102
  const event = eventFor(change, existing, { color, source, actor: who, evidence, reason, at });
100
103
  const light = await writeLight(Model, query, existing, lightPatch(change, { actor: who, evidence, reason, now: at }), event);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peopl-health/nexus",
3
- "version": "5.60.0-dev.11094",
3
+ "version": "5.60.0-dev.11095",
4
4
  "description": "Core messaging and assistant library for WhatsApp communication platforms",
5
5
  "keywords": [
6
6
  "whatsapp",