@@ -22,23 +22,23 @@ class Slack < OmniAuth::Strategies::OAuth2
22
22
23
23
info do
24
24
{
25
- name : user_info [ 'user' ] . fetch ( 'profile' ) [ 'real_name_normalized' ] ,
26
- email : user_info [ 'user' ] . fetch ( 'profile' ) [ 'email' ] ,
25
+ name : user_info [ 'user' ] . to_h [ 'profile' ] . to_h [ 'real_name_normalized' ] ,
26
+ email : user_info [ 'user' ] . to_h [ 'profile' ] . to_h [ 'email' ] ,
27
27
nickname : raw_info [ 'user' ] ,
28
- first_name : user_info [ 'user' ] . fetch ( 'profile' ) [ 'first_name' ] ,
29
- last_name : user_info [ 'user' ] . fetch ( 'profile' ) [ 'last_name' ] ,
30
- description : user_info [ 'user' ] . fetch ( 'profile' ) [ 'title' ] ,
31
- image_24 : user_info [ 'user' ] . fetch ( 'profile' ) [ 'image_24' ] ,
32
- image_48 : user_info [ 'user' ] . fetch ( 'profile' ) [ 'image_48' ] ,
33
- image : user_info [ 'user' ] . fetch ( 'profile' ) [ 'image_192' ] ,
28
+ first_name : user_info [ 'user' ] . to_h [ 'profile' ] . to_h [ 'first_name' ] ,
29
+ last_name : user_info [ 'user' ] . to_h [ 'profile' ] . to_h [ 'last_name' ] ,
30
+ description : user_info [ 'user' ] . to_h [ 'profile' ] . to_h [ 'title' ] ,
31
+ image_24 : user_info [ 'user' ] . to_h [ 'profile' ] . to_h [ 'image_24' ] ,
32
+ image_48 : user_info [ 'user' ] . to_h [ 'profile' ] . to_h [ 'image_48' ] ,
33
+ image : user_info [ 'user' ] . to_h [ 'profile' ] . to_h [ 'image_192' ] ,
34
34
team : raw_info [ 'team' ] ,
35
35
user : raw_info [ 'user' ] ,
36
36
team_id : raw_info [ 'team_id' ] ,
37
- team_domain : team_info [ 'team' ] [ 'domain' ] ,
37
+ team_domain : team_info [ 'team' ] . to_h [ 'domain' ] ,
38
38
user_id : raw_info [ 'user_id' ] ,
39
- is_admin : user_info [ 'user' ] [ 'is_admin' ] ,
40
- is_owner : user_info [ 'user' ] [ 'is_owner' ] ,
41
- time_zone : user_info [ 'user' ] [ 'tz' ]
39
+ is_admin : user_info [ 'user' ] . to_h [ 'is_admin' ] ,
40
+ is_owner : user_info [ 'user' ] . to_h [ 'is_owner' ] ,
41
+ time_zone : user_info [ 'user' ] . to_h [ 'tz' ]
42
42
}
43
43
end
44
44
0 commit comments