Commit Graph

1 Commits

Author SHA1 Message Date
Garfield
adebe29ca0 feat: Slack alerts for chat widget escalations + support@ email polling
- notifications/slack.ts: added sendChatEscalationAlert (fires when visitor
  asks about pricing, demo, help, or a human) and sendSupportEmailAlert
- email-poller.ts: polls support@squaremcp.com every 5 min via IMAP,
  deduplicates with Redis (support📧alerted_uids), fires Slack alert
  for each new unseen message
- index.ts: detectEscalation() scans last user message for trigger phrases;
  chat endpoint fires alert fire-and-forget after responding; startEmailPoller()
  called on server boot

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 21:47:43 -04:00