Skip to content

Commit

Permalink
extracts first and last name from slack user profile
Browse files Browse the repository at this point in the history
  • Loading branch information
lsiv568 authored and markbates committed Jan 24, 2018
1 parent 12866fa commit 1f7039e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions providers/slack/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ func userFromReader(r io.Reader, user *goth.User) error {
Email string `json:"email"`
Name string `json:"real_name"`
AvatarURL string `json:"image_32"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
} `json:"profile"`
} `json:"user"`
}{}
Expand All @@ -176,6 +178,8 @@ func userFromReader(r io.Reader, user *goth.User) error {
user.NickName = u.User.NickName
user.UserID = u.User.ID
user.AvatarURL = u.User.Profile.AvatarURL
user.FirstName = u.User.Profile.FirstName
user.LastName = u.User.Profile.LastName
return nil
}

Expand Down

0 comments on commit 1f7039e

Please sign in to comment.