mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
9 lines
380 B
TypeScript
9 lines
380 B
TypeScript
// Slack helper module supports configured state behavior.
|
|
const SLACK_CONFIGURED_ENV_KEYS = ["SLACK_APP_TOKEN", "SLACK_BOT_TOKEN", "SLACK_USER_TOKEN"];
|
|
|
|
export function hasSlackConfiguredState(params: { env?: NodeJS.ProcessEnv }): boolean {
|
|
return SLACK_CONFIGURED_ENV_KEYS.some(
|
|
(key) => typeof params.env?.[key] === "string" && params.env[key]?.trim().length > 0,
|
|
);
|
|
}
|