about summary refs log tree commit diff
path: root/LibMatrix/RoomTypes
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-10-14 23:19:25 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-10-14 23:19:25 +0200
commit4340b1899470c06f170817dbc1200040619fbf8d (patch)
treed1d6049d7bc8185c4222238a49846f964bfa7848 /LibMatrix/RoomTypes
parentError handling (diff)
downloadLibMatrix-bak-4340b1899470c06f170817dbc1200040619fbf8d.tar.xz
Handle floats etc in requests
Diffstat (limited to 'LibMatrix/RoomTypes')
-rw-r--r--LibMatrix/RoomTypes/GenericRoom.cs5
1 files changed, 2 insertions, 3 deletions
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<StateEventResponse?> GetFullStateAsync() { - var res = await _httpClient.GetAsync($"/_matrix/client/v3/rooms/{RoomId}/state"); - var result = - JsonSerializer.DeserializeAsyncEnumerable<StateEventResponse>(await res.Content.ReadAsStreamAsync()); + var result = _httpClient.GetAsyncEnumerableFromJsonAsync<StateEventResponse>( + $"/_matrix/client/v3/rooms/{RoomId}/state"); await foreach (var resp in result) { yield return resp; }