+1
CRUSH.md
+1
CRUSH.md
···
60
60
61
61
Config (wrangler.toml):
62
62
- `PUBLIC_URL` - Public URL of the service (e.g., https://l4.dunkirk.sh)
63
+
- `ALLOWED_CHANNELS` - Comma-separated Slack channel IDs (e.g., "C12345,C67890"). Leave empty to allow all channels.
63
64
64
65
Secrets:
65
66
- `AUTH_TOKEN` - Auth token for API uploads
+7
src/index.ts
+7
src/index.ts
···
26
26
return;
27
27
}
28
28
29
+
// Check if channel is allowed
30
+
const allowedChannels = env.ALLOWED_CHANNELS?.split(",").map(c => c.trim()) || [];
31
+
if (allowedChannels.length > 0 && !allowedChannels.includes(payload.channel)) {
32
+
return;
33
+
}
34
+
29
35
// React with loading emoji
30
36
await context.client.reactions.add({
31
37
channel: payload.channel,
···
302
308
IMAGES: R2Bucket;
303
309
AUTH_TOKEN: string;
304
310
PUBLIC_URL: string;
311
+
ALLOWED_CHANNELS?: string;
305
312
}