summary refs log tree commit diff
path: root/MxApiExtensions.Classes.LibMatrix/RoomInfoEntry.cs
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-09-04 02:18:47 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-09-04 02:18:47 +0200
commit7e40421d0eaee613be5b807502eb25fafebde5b1 (patch)
treeaf84e4c39fd0c3cfa05e1b66fb566d5cda59607f /MxApiExtensions.Classes.LibMatrix/RoomInfoEntry.cs
parentCode cleanup (diff)
downloadMxApiExtensions-7e40421d0eaee613be5b807502eb25fafebde5b1.tar.xz
Added a lot of utilities
Diffstat (limited to 'MxApiExtensions.Classes.LibMatrix/RoomInfoEntry.cs')
-rw-r--r--MxApiExtensions.Classes.LibMatrix/RoomInfoEntry.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/MxApiExtensions.Classes.LibMatrix/RoomInfoEntry.cs b/MxApiExtensions.Classes.LibMatrix/RoomInfoEntry.cs
new file mode 100644

index 0000000..6ea188e --- /dev/null +++ b/MxApiExtensions.Classes.LibMatrix/RoomInfoEntry.cs
@@ -0,0 +1,20 @@ +using System.Text.Json.Serialization; +using LibMatrix.Responses; + +namespace LibMatrix.MxApiExtensions; + +/// <summary> +/// Generic room info, this will most likely be out of date due to caching! +/// This is only useful for giving a rough idea of the room state. +/// </summary> +public class RoomInfoEntry { + public string RoomId { get; set; } + public List<StateEventResponse?> RoomState { get; set; } + + public int StateCount { get; set; } + + public Dictionary<string, int> MemberCounts { get; set; } = new(); + + // [JsonIgnore] + public DateTime ExpiresAt { get; set; } = DateTime.Now.AddMinutes(1); +}