From 61525f84666c4e9fb88bddaa98348d03a728ceed Mon Sep 17 00:00:00 2001 From: David Vitor Antonio Date: Thu, 11 Apr 2024 16:41:56 -0300 Subject: [PATCH] fix(telegram): fix oneTime --- packages/channels/src/telegram/senders/common.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/channels/src/telegram/senders/common.ts b/packages/channels/src/telegram/senders/common.ts index b1a671cb1..c833a0140 100644 --- a/packages/channels/src/telegram/senders/common.ts +++ b/packages/channels/src/telegram/senders/common.ts @@ -1,3 +1,4 @@ +import { Markup } from 'telegraf' import { CommonSender } from '../../base/senders/common' import { TelegramContext } from '../context' @@ -7,6 +8,9 @@ export class TelegramCommonSender extends CommonSender { const chatId = context.thread for (const message of context.messages) { + // Force remove keyboard -> oneTime() not working https://github.com/telegraf/telegraf/issues/167 + message.extra = { ...Markup.removeKeyboard(), ...message.extra } + if (message.action) { await telegram.sendChatAction(chatId, message.action) }