File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -715,8 +715,8 @@ const EnvironmentSchema = z.object({
715
715
QUEUE_SSE_AUTORELOAD_INTERVAL_MS : z . coerce . number ( ) . int ( ) . default ( 5_000 ) ,
716
716
QUEUE_SSE_AUTORELOAD_TIMEOUT_MS : z . coerce . number ( ) . int ( ) . default ( 60_000 ) ,
717
717
718
- SLACK_BOT_TOKEN : z . string ( ) ,
719
- SLACK_SIGNUP_REASON_CHANNEL_ID : z . string ( ) ,
718
+ SLACK_BOT_TOKEN : z . string ( ) . optional ( ) ,
719
+ SLACK_SIGNUP_REASON_CHANNEL_ID : z . string ( ) . optional ( ) ,
720
720
} ) ;
721
721
722
722
export type Environment = z . infer < typeof EnvironmentSchema > ;
Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ type SendNewOrgMessageParams = {
11
11
} ;
12
12
13
13
export async function sendNewOrgMessage ( { orgName, whyUseUs, userEmail } : SendNewOrgMessageParams ) {
14
+ if ( ! env . SLACK_BOT_TOKEN || ! env . SLACK_SIGNUP_REASON_CHANNEL_ID ) {
15
+ return ;
16
+ }
14
17
try {
15
18
await slack . chat . postMessage ( {
16
19
channel : env . SLACK_SIGNUP_REASON_CHANNEL_ID ,
You can’t perform that action at this time.
0 commit comments