Skip to content

Commit 2874e91

Browse files
committed
fix(slack): use empty string fallback for email and make type non-optional
1 parent 33070c3 commit 2874e91

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

apps/sim/tools/slack/get_user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export const slackGetUserTool: ToolConfig<SlackGetUserParams, SlackGetUserRespon
8585
first_name: profile.first_name || '',
8686
last_name: profile.last_name || '',
8787
title: profile.title || '',
88-
email: profile.email ?? null,
88+
email: profile.email || '',
8989
phone: profile.phone || '',
9090
skype: profile.skype || '',
9191
is_bot: user.is_bot || false,

apps/sim/tools/slack/list_users.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export const slackListUsersTool: ToolConfig<SlackListUsersParams, SlackListUsers
9393
name: user.name,
9494
real_name: user.real_name || user.profile?.real_name || '',
9595
display_name: user.profile?.display_name || '',
96-
email: user.profile?.email ?? null,
96+
email: user.profile?.email || '',
9797
is_bot: user.is_bot || false,
9898
is_admin: user.is_admin || false,
9999
is_owner: user.is_owner || false,

apps/sim/tools/slack/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ export interface SlackUser {
963963
title?: string
964964
phone?: string
965965
skype?: string
966-
email?: string | null
966+
email: string
967967
is_bot: boolean
968968
is_admin: boolean
969969
is_owner: boolean

0 commit comments

Comments
 (0)