11import type { webhook } from "@line/bot-sdk" ;
2- import type { NextFunction , Request , Response } from "express" ;
32import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types" ;
43import { DEFAULT_GROUP_HISTORY_LIMIT , type HistoryEntry } from "openclaw/plugin-sdk/reply-history" ;
54import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot" ;
@@ -12,7 +11,6 @@ import { resolveLineAccount } from "./accounts.js";
1211import { createLineWebhookReplayCache , handleLineWebhookEvents } from "./bot-handlers.js" ;
1312import type { LineInboundContext } from "./bot-message-context.js" ;
1413import type { ResolvedLineAccount } from "./types.js" ;
15- import { startLineWebhook } from "./webhook.js" ;
1614
1715export interface LineBotOptions {
1816 channelAccessToken : string ;
@@ -70,17 +68,3 @@ export function createLineBot(opts: LineBotOptions): LineBot {
7068 account,
7169 } ;
7270}
73-
74- export function createLineWebhookCallback (
75- bot : LineBot ,
76- channelSecret : string ,
77- path = "/line/webhook" ,
78- ) : { path : string ; handler : ( req : Request , res : Response , _next : NextFunction ) => Promise < void > } {
79- const { handler } = startLineWebhook ( {
80- channelSecret,
81- onEvents : bot . handleWebhook ,
82- path,
83- } ) ;
84-
85- return { path, handler } ;
86- }
0 commit comments