mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 03:28:29 +00:00
fix: require thread specs for telegram sends
This commit is contained in:
@@ -221,7 +221,9 @@ export async function sendMessageTelegram(
|
||||
// Only include these if actually provided to keep API calls clean.
|
||||
const messageThreadId =
|
||||
opts.messageThreadId != null ? opts.messageThreadId : target.messageThreadId;
|
||||
const threadIdParams = buildTelegramThreadParams(messageThreadId);
|
||||
const threadSpec =
|
||||
messageThreadId != null ? { id: messageThreadId, scope: "forum" as const } : undefined;
|
||||
const threadIdParams = buildTelegramThreadParams(threadSpec);
|
||||
const threadParams: Record<string, unknown> = threadIdParams ? { ...threadIdParams } : {};
|
||||
const quoteText = opts.quoteText?.trim();
|
||||
if (opts.replyToMessageId != null) {
|
||||
@@ -694,7 +696,9 @@ export async function sendStickerTelegram(
|
||||
|
||||
const messageThreadId =
|
||||
opts.messageThreadId != null ? opts.messageThreadId : target.messageThreadId;
|
||||
const threadIdParams = buildTelegramThreadParams(messageThreadId);
|
||||
const threadSpec =
|
||||
messageThreadId != null ? { id: messageThreadId, scope: "forum" as const } : undefined;
|
||||
const threadIdParams = buildTelegramThreadParams(threadSpec);
|
||||
const threadParams: Record<string, number> = threadIdParams ? { ...threadIdParams } : {};
|
||||
if (opts.replyToMessageId != null) {
|
||||
threadParams.reply_to_message_id = Math.trunc(opts.replyToMessageId);
|
||||
|
||||
Reference in New Issue
Block a user