mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 22:34:32 +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
|
// Slack native text streaming state
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
const streamingEnabled = account.config.streaming === true;
|
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({
|
const useStreaming = shouldUseStreaming({
|
||||||
streamingEnabled,
|
streamingEnabled,
|
||||||
threadTs: replyThreadTs ?? incomingThreadTs ?? statusThreadTs,
|
threadTs: streamThreadHint,
|
||||||
});
|
});
|
||||||
|
|
||||||
let streamSession: SlackStreamSession | null = null;
|
let streamSession: SlackStreamSession | null = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user