fix: avoid slack startup auth rejection leak · openclaw/openclaw@53f536b
steipete
·
2026-04-27
·
via Recent Commits to openclaw:main
File tree
extensions/slack/src/monitor
| Original file line number | Diff line number | Diff line change |
|---|
@@ -186,6 +186,10 @@ export function createSlackBoltApp(params: {
|
186 | 186 | receiver, |
187 | 187 | clientOptions: params.clientOptions, |
188 | 188 | ignoreSelf: false, |
| 189 | +// Bolt eagerly starts an auth.test promise in the constructor when token |
| 190 | +// verification is enabled. Invalid tokens can reject before any listener |
| 191 | +// consumes that promise, tripping OpenClaw's fatal unhandled-rejection path. |
| 192 | +tokenVerificationEnabled: false, |
189 | 193 | }); |
190 | 194 | app.use(async (args) => { |
191 | 195 | if (shouldSkipOpenClawSlackSelfEvent(args)) { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -168,6 +168,7 @@ describe("createSlackBoltApp", () => {
|
168 | 168 | receiver, |
169 | 169 | clientOptions, |
170 | 170 | ignoreSelf: false, |
| 171 | +tokenVerificationEnabled: false, |
171 | 172 | }); |
172 | 173 | expect((app as unknown as FakeApp).middleware).toHaveLength(1); |
173 | 174 | }); |
@@ -198,6 +199,7 @@ describe("createSlackBoltApp", () => {
|
198 | 199 | receiver, |
199 | 200 | clientOptions, |
200 | 201 | ignoreSelf: false, |
| 202 | +tokenVerificationEnabled: false, |
201 | 203 | }); |
202 | 204 | expect((app as unknown as FakeApp).middleware).toHaveLength(1); |
203 | 205 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。