chore: generate

This commit is contained in:
GitHub Action
2026-01-21 04:07:26 +00:00
parent be9a0bfee7
commit 217e4850db

View File

@@ -226,16 +226,18 @@ export default new Hono<{ Bindings: Env }>()
content?: string
}
}
}
}
console.log(JSON.stringify(body, null, 2))
const challenge = body.challenge
if (challenge) return c.json({ challenge })
const content = body.event?.message?.content
const parsed =
typeof content === "string" && content.trim().startsWith("{") ? (JSON.parse(content) as {
typeof content === "string" && content.trim().startsWith("{")
? (JSON.parse(content) as {
text?: string
}) : undefined
})
: undefined
const text = typeof parsed?.text === "string" ? parsed.text : typeof content === "string" ? content : ""
let message = text.trim().replace(/^@_user_\d+\s*/, "")