SLACK_DM_POLICY support for Slack DM access control#278
Open
cmbalaji3 wants to merge 2 commits intocloudflare:mainfrom
Open
SLACK_DM_POLICY support for Slack DM access control#278cmbalaji3 wants to merge 2 commits intocloudflare:mainfrom
cmbalaji3 wants to merge 2 commits intocloudflare:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add Slack DM policy support to match existing Telegram/Discord DM policy handling in moltworker.
This introduces a new
SLACK_DM_POLICYenv var, passes it through to the container, and applies it in the startup config patch so Slack DM access can be configured aspairing(default) oropen.Why
Users can already configure DM policy behavior for Telegram and Discord, but Slack lacked the same control. This PR brings Slack parity and documents the new setting.
Changes
start-openclaw.shto apply Slack DM policy under Slack channel config.pairing.open, set Slack allowlist wildcard to permit open DM access.SLACK_DM_POLICYtoMoltbotEnvinsrc/types.ts.SLACK_DM_POLICYthroughbuildEnvVars()insrc/gateway/env.ts.src/gateway/env.test.tsto verifySLACK_DM_POLICYpassthrough.README.md,AGENTS.md,.dev.vars.example, andwrangler.jsonc..github/workflows/test.yml.Test Plan
npm run typechecknpm test -- src/gateway/env.test.tsSLACK_DM_POLICYis forwarded into startup envSLACK_DM_POLICY=pairingrequires pairing flowSLACK_DM_POLICY=openallows DM access without pairingNotes