diff options
author | Emma@Rory& <root@rory.gay> | 2023-09-15 09:55:36 +0200 |
---|---|---|
committer | Emma@Rory& <root@rory.gay> | 2023-09-15 09:55:36 +0200 |
commit | e10fa389ce3c4d42deadfec8bf08c2fbb1a88d79 (patch) | |
tree | 1e2f8d8de07c6037ac4aa20be3b54ac43c2d7f2e /MatrixRoomUtils.Desktop/RoomInfo.cs | |
parent | Code cleanup (diff) | |
download | MatrixUtils-e10fa389ce3c4d42deadfec8bf08c2fbb1a88d79.tar.xz |
Refactors
Diffstat (limited to 'MatrixRoomUtils.Desktop/RoomInfo.cs')
-rw-r--r-- | MatrixRoomUtils.Desktop/RoomInfo.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/MatrixRoomUtils.Desktop/RoomInfo.cs b/MatrixRoomUtils.Desktop/RoomInfo.cs index 4e76247..ebd80ab 100644 --- a/MatrixRoomUtils.Desktop/RoomInfo.cs +++ b/MatrixRoomUtils.Desktop/RoomInfo.cs @@ -1,4 +1,5 @@ using LibMatrix; +using LibMatrix.Interfaces; using LibMatrix.Responses; using LibMatrix.RoomTypes; @@ -23,7 +24,7 @@ public class RoomInfo { StateKey = stateKey }; try { - @event.TypedContent = await Room.GetStateAsync<object>(type, stateKey); + @event.TypedContent = await Room.GetStateAsync<EventContent>(type, stateKey); } catch (MatrixException e) { if (e is { ErrorCode: "M_NOT_FOUND" }) @event.TypedContent = default!; |