fix(telegram): separate thread params for typing vs messages
Telegram General topic (id=1) has inconsistent API behavior: - sendMessage: rejects explicit message_thread_id=1 - sendChatAction: requires message_thread_id=1 for typing to show Split into two helper functions: - buildTelegramThreadParams: excludes General topic for messages - buildTypingThreadParams: includes General topic for typing
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
buildTelegramGroupFrom,
|
||||
buildTelegramGroupPeerId,
|
||||
buildTelegramThreadParams,
|
||||
buildTypingThreadParams,
|
||||
describeReplyTarget,
|
||||
extractTelegramLocation,
|
||||
hasBotMention,
|
||||
@@ -92,7 +93,7 @@ export const buildTelegramMessageContext = async ({
|
||||
|
||||
const sendTyping = async () => {
|
||||
try {
|
||||
await bot.api.sendChatAction(chatId, "typing", buildTelegramThreadParams(resolvedThreadId));
|
||||
await bot.api.sendChatAction(chatId, "typing", buildTypingThreadParams(resolvedThreadId));
|
||||
} catch (err) {
|
||||
logVerbose(`telegram typing cue failed for chat ${chatId}: ${String(err)}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user