mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 12:37:40 +00:00
fix(telegram): preserve inbound quote context and avoid QUOTE_TEXT_INVALID
This commit is contained in:
committed by
Ayaan Zaidi
parent
727a390d13
commit
a4b38ce886
@@ -484,16 +484,8 @@ function buildTelegramSendParams(opts?: {
|
||||
}): Record<string, unknown> {
|
||||
const threadParams = buildTelegramThreadParams(opts?.thread);
|
||||
const params: Record<string, unknown> = {};
|
||||
const quoteText = opts?.replyQuoteText?.trim();
|
||||
if (opts?.replyToMessageId) {
|
||||
if (quoteText) {
|
||||
params.reply_parameters = {
|
||||
message_id: Math.trunc(opts.replyToMessageId),
|
||||
quote: quoteText,
|
||||
};
|
||||
} else {
|
||||
params.reply_to_message_id = opts.replyToMessageId;
|
||||
}
|
||||
params.reply_to_message_id = opts.replyToMessageId;
|
||||
}
|
||||
if (threadParams) {
|
||||
params.message_thread_id = threadParams.message_thread_id;
|
||||
|
||||
Reference in New Issue
Block a user