fix: reduce Slack WebClient retries

This commit is contained in:
Peter Steinberger
2026-01-23 06:28:01 +00:00
parent 4912e85ac8
commit 68ea6e521b
11 changed files with 94 additions and 15 deletions

View File

@@ -1,4 +1,6 @@
import { WebClient } from "@slack/web-api";
import type { WebClient } from "@slack/web-api";
import { createSlackWebClient } from "./client.js";
export type SlackChannelLookup = {
id: string;
@@ -84,7 +86,7 @@ export async function resolveSlackChannelAllowlist(params: {
entries: string[];
client?: WebClient;
}): Promise<SlackChannelResolution[]> {
const client = params.client ?? new WebClient(params.token);
const client = params.client ?? createSlackWebClient(params.token);
const channels = await listSlackChannels(client);
const results: SlackChannelResolution[] = [];