Skip to content

Commit ab1886b

Browse files
committed
slack: remove name, real_name from user
`real_name` not guaranteed to be present in every user object `name` field usage discouraged in docs https://api.slack.com/types/user both fields currently unused
1 parent eaa4060 commit ab1886b

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

lib/api_local.ml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,7 @@ module Slack : Api.Slack = struct
6969

7070
let lookup_user ?cache:_ ~ctx:_ ~(cfg : Config_t.config) ~email () =
7171
let email = List.assoc_opt email cfg.user_mappings |> Option.default email in
72-
let mock_user =
73-
{
74-
Slack_t.id = sprintf "id[%s]" email;
75-
name = sprintf "name[%s]" email;
76-
real_name = sprintf "real_name[%s]" email;
77-
profile = { email = Some email };
78-
}
79-
in
72+
let mock_user = { Slack_t.id = sprintf "id[%s]" email; profile = { email = Some email } } in
8073
let mock_response = { Slack_t.user = mock_user } in
8174
Lwt.return @@ Ok mock_response
8275

lib/slack.atd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ type profile = {
8080

8181
type user = {
8282
id: string;
83-
name: string;
84-
real_name: string;
8583
profile: profile
8684
}
8785

0 commit comments

Comments
 (0)