mirror of
https://github.com/vercel/chat.git
synced 2026-09-14 18:32:29 +08:00
283edba8ab
* feat(slack): enable DM support with per-thread IDs and implicit mentions DMs now use per-message threadTs (same as channels) instead of collapsing all DM messages into one thread. Each top-level DM starts a new conversation; thread replies continue the same conversation. DM messages automatically set isMention=true so bots process them without requiring @mention — natural for 1:1 conversations. * fix: use empty threadTs for top-level DMs, thread_ts for replies Top-level DM messages use empty threadTs to match openDM() subscriptions. DM thread replies use thread_ts for per-conversation isolation. Fixes integration test replay-dm.test.ts. * style: fix biome formatting * test: add e2e replay tests for direct DM implicit mention * style: fix extra blank line lint error * test: use real recorded DM fixtures for e2e tests
Integration Tests
Integration tests for the Chat SDK that verify real-world webhook payloads are handled correctly.
Test Categories
- Unit tests (
slack.test.ts,teams.test.ts,gchat.test.ts) - Test adapter functionality with mock payloads - Replay tests (
replay*.test.ts) - Replay actual production webhook recordings
Replay Tests
Replay tests use recorded webhook payloads from production to verify the SDK handles real interactions correctly.
See fixtures/replay/README.md for:
- How to record new fixtures
- Fixture format documentation
- SHA-based recording workflow
- Platform-specific webhook formats
Running Tests
# Run all integration tests
pnpm --filter @chat-adapter/integration-tests test
# Run with watch mode
pnpm --filter @chat-adapter/integration-tests test:watch