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({
715715 QUEUE_SSE_AUTORELOAD_INTERVAL_MS : z . coerce . number ( ) . int ( ) . default ( 5_000 ) ,
716716 QUEUE_SSE_AUTORELOAD_TIMEOUT_MS : z . coerce . number ( ) . int ( ) . default ( 60_000 ) ,
717717
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 ( ) ,
720720} ) ;
721721
722722export type Environment = z . infer < typeof EnvironmentSchema > ;
Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ type SendNewOrgMessageParams = {
1111} ;
1212
1313export async function sendNewOrgMessage ( { orgName, whyUseUs, userEmail } : SendNewOrgMessageParams ) {
14+ if ( ! env . SLACK_BOT_TOKEN || ! env . SLACK_SIGNUP_REASON_CHANNEL_ID ) {
15+ return ;
16+ }
1417 try {
1518 await slack . chat . postMessage ( {
1619 channel : env . SLACK_SIGNUP_REASON_CHANNEL_ID ,
You can’t perform that action at this time.
0 commit comments