From c49866d3561d27d941e02e530fd3b84f78b6955f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=81=D0=B5=D0=BB=D1=8C?= Date: Mon, 16 Nov 2026 20:11:07 +0500 Subject: [PATCH] PEP-131: voiceText takes the user after rebase onto feedback voice (PEP-143) Co-Authored-By: Claude Sonnet 5.5 --- apps/bot/src/bot.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/bot/src/bot.ts b/apps/bot/src/bot.ts index 2e6f28ec..931857bb 100644 --- a/apps/bot/src/bot.ts +++ b/apps/bot/src/bot.ts @@ -626,7 +626,7 @@ export function createBot(o: BotOptions) { } /** Text of a voice note; null — it could not be heard, and the user has been told. */ - async function voiceText(m: TgMessage): Promise { + async function voiceText(user: User, m: TgMessage): Promise { const f = m.voice ?? m.audio!; const cfg = transcribeConfig(); if (!cfg) return reply(m.chat.id, tr("Голосовые сообщения пока не работают. Напишите задачу текстом."), m.message_id).then(() => null); @@ -649,7 +649,7 @@ export function createBot(o: BotOptions) { } async function onVoice(user: User, m: TgMessage) { - const text = await voiceText(m); + const text = await voiceText(user, m); if (text) await onPlainText(user, m.chat.id, text, true); } @@ -685,7 +685,7 @@ export function createBot(o: BotOptions) { if (text.startsWith("/")) return closeFeedbackMode(db, user.id).then(() => "pass" as const); let said = text || m.caption?.trim() || ""; if (!said && (m.voice || m.audio)) { - const heard = await voiceText(m); + const heard = await voiceText(user, m); if (!heard) return "done"; said = heard; }