mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-16 12:30:49 +00:00
* fix(slack): preserve thread_ts in queue drain and deliveryContext Two related fixes for Slack thread reply routing: 1. Queue drain drops string thread_ts (#11195) - `typeof threadId === "number"` in drain.ts only matches Telegram numeric topic IDs. Slack thread_ts is a string like "1770474140.187459" which fails the check, causing threadKey to become empty. - Changed to `threadId != null && threadId !== ""` to accept both number and string thread IDs. - Applies to all 3 occurrences in drain.ts: cross-channel detection, thread key building, and collected originatingThreadId extraction. 2. DM deliveryContext missing thread_ts (#10837) - updateLastRoute calls for Slack DMs in both prepare.ts and dispatch.ts built deliveryContext without threadId, so the session's delivery context never included thread_ts for DM threads. - Added threadId from threadContext.messageThreadId / ctxPayload.MessageThreadId to both updateLastRoute call sites. Tests: 3 new cases in queue.collect-routing.test.ts - Collects messages with matching string thread_ts (same Slack thread) - Separates messages with different string thread_ts (different threads) - Treats empty string threadId same as absent Closes #10837, closes #11195 * fix(slack): preserve string thread context in queue + DM route updates --------- Co-authored-by: RobClawd <clawd@RobClawds-Mac-mini.local>