Files
openclaw/extensions/line/src/webhook-utils.ts
2026-04-06 13:25:17 +01:00

11 lines
293 B
TypeScript

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;
}
}