Files
openclaw/extensions/line/src/webhook-utils.ts
2026-06-04 21:40:44 -04:00

12 lines
348 B
TypeScript

// Line helper module supports webhook utils behavior.
import type { webhook } from "@line/bot-sdk";
export { validateLineSignature } from "./signature.js";
export function parseLineWebhookBody(rawBody: string): webhook.CallbackRequest | null {
try {
return JSON.parse(rawBody) as webhook.CallbackRequest;
} catch {
return null;
}
}