mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 11:41:24 +00:00
fix: unify telegram thread handling
This commit is contained in:
@@ -56,7 +56,7 @@ export const dispatchTelegramMessage = async ({
|
||||
msg,
|
||||
chatId,
|
||||
isGroup,
|
||||
replyThreadId,
|
||||
threadSpec,
|
||||
historyKey,
|
||||
historyLimit,
|
||||
groupHistories,
|
||||
@@ -70,8 +70,7 @@ export const dispatchTelegramMessage = async ({
|
||||
} = context;
|
||||
|
||||
const isPrivateChat = msg.chat.type === "private";
|
||||
const messageThreadId = (msg as { message_thread_id?: number }).message_thread_id;
|
||||
const draftThreadId = replyThreadId ?? messageThreadId;
|
||||
const draftThreadId = threadSpec.id;
|
||||
const draftMaxChars = Math.min(textLimit, 4096);
|
||||
const canStreamDraft =
|
||||
streamMode !== "off" &&
|
||||
@@ -84,7 +83,7 @@ export const dispatchTelegramMessage = async ({
|
||||
chatId,
|
||||
draftId: msg.message_id || Date.now(),
|
||||
maxChars: draftMaxChars,
|
||||
messageThreadId: draftThreadId,
|
||||
thread: threadSpec,
|
||||
log: logVerbose,
|
||||
warn: logVerbose,
|
||||
})
|
||||
@@ -243,7 +242,7 @@ export const dispatchTelegramMessage = async ({
|
||||
bot,
|
||||
replyToMode,
|
||||
textLimit,
|
||||
messageThreadId: replyThreadId,
|
||||
thread: threadSpec,
|
||||
tableMode,
|
||||
chunkMode,
|
||||
onVoiceRecording: sendRecordVoice,
|
||||
@@ -294,7 +293,7 @@ export const dispatchTelegramMessage = async ({
|
||||
bot,
|
||||
replyToMode,
|
||||
textLimit,
|
||||
messageThreadId: replyThreadId,
|
||||
thread: threadSpec,
|
||||
tableMode,
|
||||
chunkMode,
|
||||
linkPreview: telegramCfg.linkPreview,
|
||||
|
||||
Reference in New Issue
Block a user