mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-29 01:52:04 +00:00
fix: don't consume replyPlan reference eagerly for streaming check
The streaming check was calling replyPlan.nextThreadTs() at setup time to determine if a thread_ts existed, which consumed the first reference before the deliver callback ran. Use incomingThreadTs/statusThreadTs directly for the streaming eligibility check instead.
This commit is contained in:
@@ -138,11 +138,13 @@ export async function dispatchPreparedSlackMessage(prepared: PreparedSlackMessag
|
||||
// Slack native text streaming state
|
||||
// -----------------------------------------------------------------------
|
||||
const streamingEnabled = account.config.streaming === true;
|
||||
const replyThreadTs = replyPlan.nextThreadTs();
|
||||
|
||||
// Peek at the thread target without consuming it (for streaming check only).
|
||||
const streamThreadHint = incomingThreadTs ?? statusThreadTs;
|
||||
|
||||
const useStreaming = shouldUseStreaming({
|
||||
streamingEnabled,
|
||||
threadTs: replyThreadTs ?? incomingThreadTs ?? statusThreadTs,
|
||||
threadTs: streamThreadHint,
|
||||
});
|
||||
|
||||
let streamSession: SlackStreamSession | null = null;
|
||||
|
||||
Reference in New Issue
Block a user