gigafibre-fsm/services/targo-hub
louispaulb 9466645e17 fix(inbox): never resolve our own domains to a customer (wrong sender names)
Root cause: some F customer records carry our own/staff addresses in email_billing,
so matchCustomer's `email_billing LIKE '%addr%'` resolved support@targo.ca -> "Guylaine
Gagnon" and gilles@targointernet.com -> "Sylvie Juteau". Every thread on one of our
addresses then inherited that wrong customer + name.

- OWN_DOMAINS promoted to a single source in lib/helpers.js (was duplicated in
  conversation.js); inbox-triage.matchCustomer() now returns null for any own-domain
  address — a customer is never reachable at targo.ca / targointernet.com / gigafibre.ca.
- conversation.js consumes the shared OWN_DOMAINS (removes the local copy).

Also ran a one-shot repair (temporary endpoint, since removed) that unlinked the 6
already-contaminated threads and reset their display name to the real address.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 06:51:04 -04:00
..
data refactor: reduce token count, DRY code, consolidate docs 2026-04-13 08:39:58 -04:00
docs feat(fsm): platform build — comms UI, F→ERPNext sync/billing, roster, campaigns, network, reports 2026-06-15 06:12:12 -04:00
lib fix(inbox): never resolve our own domains to a customer (wrong sender names) 2026-06-15 06:51:04 -04:00
preview feat: flow editor, Gemini QR scanner with offline queue, dispatch planning v2 2026-04-22 10:44:17 -04:00
public feat(dispatch): capacité AM/PM, durées additives, capture terrain (/field), sync techs 2026-06-08 19:47:21 -04:00
scripts fix(campaigns/templates): center logos via nested-table pattern 2026-06-01 18:45:30 -04:00
templates fix(campaigns/templates): center logos via nested-table pattern 2026-06-01 18:45:30 -04:00
test Phase 1 (hygiène) : utils partagés + logique pure testable + observabilité erp + 1ers tests 2026-06-07 10:36:41 -04:00
.env.example feat(hub+ops): user invite flow sends temp password via Mailjet + dev .env.example 2026-05-05 19:50:06 -04:00
docker-compose.yml fix(hub): templates volume mount must be RW for editor saves 2026-05-22 06:49:48 -04:00
package-lock.json feat(campaigns/editor): MJML mode — proper email-focused visual builder 2026-05-21 22:29:42 -04:00
package.json Phase 1 (hygiène) : utils partagés + logique pure testable + observabilité erp + 1ers tests 2026-06-07 10:36:41 -04:00
server.js feat(fsm): platform build — comms UI, F→ERPNext sync/billing, roster, campaigns, network, reports 2026-06-15 06:12:12 -04:00