mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-05-11 18:10:01 +08:00
fix: telegram bot/miniapp bugs (#259)
This commit is contained in:
@@ -46,11 +46,9 @@ export function newTelegramBot(c: Context<HonoCustomType>, token: string): Teleg
|
||||
const bot = new Telegraf(token);
|
||||
|
||||
bot.use(async (ctx, next) => {
|
||||
// skip non-message
|
||||
if (ctx.updateType != "message") return;
|
||||
// check if in private chat
|
||||
if (ctx.chat?.type !== "private") {
|
||||
return await ctx.reply("请在私聊中使用");
|
||||
return;
|
||||
}
|
||||
|
||||
const userId = ctx?.message?.from?.id || ctx.callbackQuery?.message?.chat?.id;
|
||||
|
||||
Reference in New Issue
Block a user