Skip to content

Commit

Permalink
fix: use correct name field
Browse files Browse the repository at this point in the history
  • Loading branch information
bosc0 committed Jan 3, 2025
1 parent a910ec3 commit 1ce07a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/provider/data_source_all_users.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (d *AllUsersDataSource) Read(ctx context.Context, req datasource.ReadReques
if !user.Deleted && !user.IsBot {
resultingList = append(resultingList, AllUsersDataSourceModelUserItem{
ID: types.StringValue(user.ID),
Name: types.StringValue(user.Profile.RealName),
Name: types.StringValue(user.Name),
Email: types.StringValue(user.Profile.Email),
})
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/data_source_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (d *UserDataSource) Read(ctx context.Context, req datasource.ReadRequest, r
}

data.Email = types.StringValue(user.Profile.Email)
data.Name = types.StringValue(user.Profile.DisplayNameNormalized)
data.Name = types.StringValue(user.Name)
data.ID = types.StringValue(user.ID)

tflog.Trace(ctx, "Fetched Slack user data", map[string]any{"id": user.ID})
Expand Down

0 comments on commit 1ce07a0

Please sign in to comment.