fix: telegram query email do not pass parsedEmailContext (#555)

This commit is contained in:
Dream Hunter
2025-01-11 18:14:34 +08:00
committed by GitHub
parent b604f56d56
commit e161eb5d14
+1 -1
View File
@@ -230,7 +230,7 @@ export function newTelegramBot(c: Context<HonoCustomType>, token: string): Teleg
).bind( ).bind(
queryAddress, mailIndex queryAddress, mailIndex
).first<{ raw: string, id: string, created_at: string }>() || {}; ).first<{ raw: string, id: string, created_at: string }>() || {};
const { mail } = raw ? await parseMail(raw, queryAddress, created_at) : { mail: "已经没有邮件了" }; const { mail } = raw ? await parseMail({ rawEmail: raw }, queryAddress, created_at) : { mail: "已经没有邮件了" };
const settings = await c.env.KV.get<TelegramSettings>(CONSTANTS.TG_KV_SETTINGS_KEY, "json"); const settings = await c.env.KV.get<TelegramSettings>(CONSTANTS.TG_KV_SETTINGS_KEY, "json");
const miniAppButtons = [] const miniAppButtons = []
if (settings?.miniAppUrl && settings?.miniAppUrl?.length > 0 && mailId) { if (settings?.miniAppUrl && settings?.miniAppUrl?.length > 0 && mailId) {