This commit is contained in:
Your Name committed 2026-06-12 23:40:09 -04:00
1 parent 32e9fd5ac6
commit 658a08f8dc
1 file changed
+3 -3
+3 -3
View File
@@ -10,8 +10,8 @@ const webhookHandler = async ({ request, body, set }: { request: Request, body:
set.status = 400;
return { error: 'Missing Signature' };
}
// In our global onParse hook, we intercepted the body and returned it as a raw text string.
// xxIn our global onParse hook, we intercepted the body and returned it as a raw text string.
const rawBody = typeof body === 'string' ? body : JSON.stringify(body);
if (!rawBody) {
@@ -35,7 +35,7 @@ const webhookHandler = async ({ request, body, set }: { request: Request, body:
try {
const parsedBody = typeof body === 'string' ? JSON.parse(body) : body;
const events: line.WebhookEvent[] = parsedBody.events || [];
for (const event of events) {
if (event.type === 'message' && event.message.type === 'text') {
// Ignore verification dummy tokens