mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 17:44:33 +00:00
fix(line): mark webhook route as plugin-authenticated
This commit is contained in:
@@ -98,6 +98,9 @@ describe("monitorLineProvider lifecycle", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await vi.waitFor(() => expect(registerPluginHttpRouteMock).toHaveBeenCalledTimes(1));
|
await vi.waitFor(() => expect(registerPluginHttpRouteMock).toHaveBeenCalledTimes(1));
|
||||||
|
expect(registerPluginHttpRouteMock).toHaveBeenCalledWith(
|
||||||
|
expect.objectContaining({ auth: "plugin" }),
|
||||||
|
);
|
||||||
expect(resolved).toBe(false);
|
expect(resolved).toBe(false);
|
||||||
|
|
||||||
abort.abort();
|
abort.abort();
|
||||||
|
|||||||
@@ -288,6 +288,7 @@ export async function monitorLineProvider(
|
|||||||
const normalizedPath = normalizePluginHttpPath(webhookPath, "/line/webhook") ?? "/line/webhook";
|
const normalizedPath = normalizePluginHttpPath(webhookPath, "/line/webhook") ?? "/line/webhook";
|
||||||
const unregisterHttp = registerPluginHttpRoute({
|
const unregisterHttp = registerPluginHttpRoute({
|
||||||
path: normalizedPath,
|
path: normalizedPath,
|
||||||
|
auth: "plugin",
|
||||||
pluginId: "line",
|
pluginId: "line",
|
||||||
accountId: resolvedAccountId,
|
accountId: resolvedAccountId,
|
||||||
log: (msg) => logVerbose(msg),
|
log: (msg) => logVerbose(msg),
|
||||||
|
|||||||
Reference in New Issue
Block a user