From d7c08a645ea3154452b7dda837c7c428c9b41c2d Mon Sep 17 00:00:00 2001 From: Damir Modyarov Date: Tue, 9 Jul 2024 21:21:04 +0300 Subject: [PATCH] fix: Ignore empty inline request --- src/telegram/bot/download.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/telegram/bot/download.ts b/src/telegram/bot/download.ts index 395ad72..15cff83 100644 --- a/src/telegram/bot/download.ts +++ b/src/telegram/bot/download.ts @@ -50,6 +50,11 @@ downloadDp.onNewMessage(filters.chat("private"), async (msg) => { downloadDp.onInlineQuery(async (ctx) => { const { t, e } = await evaluatorsFor(ctx.user) + if (!ctx.query.trim()) { + await ctx.answer([]) + return + } + const req = await createRequest(ctx.query, ctx.user.id) if (!req.success) { await ctx.answer([