We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f1ab7ed commit bc03704Copy full SHA for bc03704
env/server.ts
@@ -67,5 +67,6 @@ export const serverEnv = {
67
CLOUDINARY_API_SECRET: cloudinaryParser({ allowEmpty: true, default: '' }),
68
ENABLE_SLACK_POSTING: bool({ default: false }),
69
SLACK_TOKEN: slackParser({ allowEmpty: true, default: '' }),
70
+ SLACK_CHANNEL: slackParser({ allowEmpty: true, default: '#general' }),
71
}),
72
}
lib/slack.ts
@@ -16,7 +16,7 @@ export async function postToSlackIfEnabled({
16
17
const web = new WebClient(serverEnv.SLACK_TOKEN)
18
return await web.chat.postMessage({
19
- channel: '#mike-test',
+ channel: serverEnv.SLACK_CHANNEL,
20
text: `*<${serverEnv.NEXT_APP_URL}/post/${post.id}|${post.title}>*`,
21
blocks: [
22
{
0 commit comments