mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:30:44 +00:00
fix: avoid slack startup auth rejection leak
This commit is contained in:
@@ -186,6 +186,10 @@ export function createSlackBoltApp(params: {
|
||||
receiver,
|
||||
clientOptions: params.clientOptions,
|
||||
ignoreSelf: false,
|
||||
// Bolt eagerly starts an auth.test promise in the constructor when token
|
||||
// verification is enabled. Invalid tokens can reject before any listener
|
||||
// consumes that promise, tripping OpenClaw's fatal unhandled-rejection path.
|
||||
tokenVerificationEnabled: false,
|
||||
});
|
||||
app.use(async (args) => {
|
||||
if (shouldSkipOpenClawSlackSelfEvent(args)) {
|
||||
|
||||
@@ -168,6 +168,7 @@ describe("createSlackBoltApp", () => {
|
||||
receiver,
|
||||
clientOptions,
|
||||
ignoreSelf: false,
|
||||
tokenVerificationEnabled: false,
|
||||
});
|
||||
expect((app as unknown as FakeApp).middleware).toHaveLength(1);
|
||||
});
|
||||
@@ -198,6 +199,7 @@ describe("createSlackBoltApp", () => {
|
||||
receiver,
|
||||
clientOptions,
|
||||
ignoreSelf: false,
|
||||
tokenVerificationEnabled: false,
|
||||
});
|
||||
expect((app as unknown as FakeApp).middleware).toHaveLength(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user