Skip to content

Commit 7953b66

Browse files
committed
refac code
1 parent 4a46718 commit 7953b66

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Src/LineDevelopers/Message/LineMultiPersonChatClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ protected override async Task EnsureSuccessStatusCodeAsync(HttpResponseMessage?
2525
/// The number returned excludes the LINE Official Account.</returns>
2626
public async Task<int> GetNumberOfUsersAsync(string roomId)
2727
{
28-
var json = await base.GetAsync<JsonNode>($"v2/bot/room/{roomId}/members/count").ConfigureAwait(false);
29-
return Convert.ToInt32(json["count"]);
28+
var result = await base.GetAsync<JsonNode>($"v2/bot/room/{roomId}/members/count").ConfigureAwait(false);
29+
return result["count"].GetValue<int>();
3030
}
3131

3232
/// <summary>

0 commit comments

Comments
 (0)