-
Notifications
You must be signed in to change notification settings - Fork 80
Closed
Labels
Description
SlackApiClient.UserProfile.Get() returns null if Fields isn't present in the result.
It tries to deserialize an array into a dictionary, which causes the JSON parser to freak out. This is evident when using JsonConvert.DeserializeObject<UserProfileResponse>(string result) instead of this:
SlackNet/SlackNet/SlackApiClient.cs
Line 179 in 28544a6
| private T Deserialize<T>(WebApiResponse response) where T : class => |
If
Fields is empty/null, it'll throw, whereas JObject.ToObject() won't.
SlackNet/SlackNet/Objects/UserProfile.cs
Line 24 in 28544a6
| public IDictionary<string, UserProfileField> Fields { get; set; } = new Dictionary<string, UserProfileField>(); |