about summary refs log tree commit diff
path: root/LibMatrix/Responses/SyncResponse.cs
diff options
context:
space:
mode:
Diffstat (limited to 'LibMatrix/Responses/SyncResponse.cs')
-rw-r--r--LibMatrix/Responses/SyncResponse.cs14
1 files changed, 8 insertions, 6 deletions
diff --git a/LibMatrix/Responses/SyncResponse.cs b/LibMatrix/Responses/SyncResponse.cs

index d79e820..362ccc4 100644 --- a/LibMatrix/Responses/SyncResponse.cs +++ b/LibMatrix/Responses/SyncResponse.cs
@@ -1,3 +1,4 @@ +using System.Diagnostics; using System.Text.Json.Serialization; using LibMatrix.EventTypes.Spec.State.RoomInfo; @@ -43,7 +44,7 @@ public class SyncResponse { // supporting classes public class PresenceDataStructure { [JsonPropertyName("events")] - public List<StateEventResponse>? Events { get; set; } + public List<MatrixEventResponse>? Events { get; set; } } public class RoomsDataStructure { @@ -115,13 +116,13 @@ public class SyncResponse { public class TimelineDataStructure : EventList { public TimelineDataStructure() { } - public TimelineDataStructure(List<StateEventResponse>? events, bool? limited) { + public TimelineDataStructure(List<MatrixEventResponse>? events, bool? limited) { Events = events; Limited = limited; } // [JsonPropertyName("events")] - // public List<StateEventResponse>? Events { get; set; } + // public List<MatrixEventResponse>? Events { get; set; } [JsonPropertyName("prev_batch")] public string? PrevBatch { get; set; } @@ -138,6 +139,7 @@ public class SyncResponse { public int HighlightCount { get; set; } } + [DebuggerDisplay("{JoinedMemberCount} joined, {InvitedMemberCount} invited, Heroes: {string.Join(\", \", Heroes ?? [])}")] public class SummaryDataStructure { [JsonPropertyName("m.heroes")] public List<string>? Heroes { get; set; } @@ -161,9 +163,9 @@ public class SyncResponse { AccountData?.Events?.Max(x => x.OriginServerTs) ?? 0, Presence?.Events?.Max(x => x.OriginServerTs) ?? 0, ToDevice?.Events?.Max(x => x.OriginServerTs) ?? 0, - Rooms?.Join?.Values?.Max(x => x.Timeline?.Events?.Max(y => y.OriginServerTs)) ?? 0, - Rooms?.Invite?.Values?.Max(x => x.InviteState?.Events?.Max(y => y.OriginServerTs)) ?? 0, - Rooms?.Leave?.Values?.Max(x => x.Timeline?.Events?.Max(y => y.OriginServerTs)) ?? 0 + Rooms?.Join?.Values.Max(x => x.Timeline?.Events?.Max(y => y.OriginServerTs)) ?? 0, + Rooms?.Invite?.Values.Max(x => x.InviteState?.Events?.Max(y => y.OriginServerTs)) ?? 0, + Rooms?.Leave?.Values.Max(x => x.Timeline?.Events?.Max(y => y.OriginServerTs)) ?? 0 ]).Max(); }