From 4340b1899470c06f170817dbc1200040619fbf8d Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Sat, 14 Oct 2023 23:19:25 +0200 Subject: Handle floats etc in requests --- LibMatrix/RoomTypes/GenericRoom.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'LibMatrix/RoomTypes/GenericRoom.cs') diff --git a/LibMatrix/RoomTypes/GenericRoom.cs b/LibMatrix/RoomTypes/GenericRoom.cs index 106b2f6..d11b28d 100644 --- a/LibMatrix/RoomTypes/GenericRoom.cs +++ b/LibMatrix/RoomTypes/GenericRoom.cs @@ -27,9 +27,8 @@ public class GenericRoom { public string RoomId { get; set; } public async IAsyncEnumerable GetFullStateAsync() { - var res = await _httpClient.GetAsync($"/_matrix/client/v3/rooms/{RoomId}/state"); - var result = - JsonSerializer.DeserializeAsyncEnumerable(await res.Content.ReadAsStreamAsync()); + var result = _httpClient.GetAsyncEnumerableFromJsonAsync( + $"/_matrix/client/v3/rooms/{RoomId}/state"); await foreach (var resp in result) { yield return resp; } -- cgit 1.4.1