From ff13e64dca922550eb6a955de0690d841590a9b0 Mon Sep 17 00:00:00 2001 From: Rory& Date: Wed, 26 Mar 2025 11:13:59 +0100 Subject: Split out invite context, add empty filter constants --- LibMatrix/Filters/SyncFilter.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'LibMatrix/Filters') diff --git a/LibMatrix/Filters/SyncFilter.cs b/LibMatrix/Filters/SyncFilter.cs index 787ffa7..8c66656 100644 --- a/LibMatrix/Filters/SyncFilter.cs +++ b/LibMatrix/Filters/SyncFilter.cs @@ -34,6 +34,15 @@ public class SyncFilter { [JsonPropertyName("include_leave")] public bool? IncludeLeave { get; set; } + private static readonly RoomFilter Empty = new() { + Rooms = [], + IncludeLeave = false, + AccountData = StateFilter.Empty, + Ephemeral = StateFilter.Empty, + State = StateFilter.Empty, + Timeline = StateFilter.Empty, + }; + public class StateFilter( bool? containsUrl = null, bool? includeRedundantMembers = null, @@ -65,6 +74,8 @@ public class SyncFilter { [JsonPropertyName("unread_thread_notifications")] public bool? UnreadThreadNotifications { get; set; } = unreadThreadNotifications; + + public static readonly StateFilter Empty = new(limit: 0, senders: [], types: [], rooms: []); } } @@ -83,5 +94,7 @@ public class SyncFilter { [JsonPropertyName("not_senders")] public List? NotSenders { get; set; } = notSenders; + + public static readonly EventFilter Empty = new(limit: 0, senders: [], types: []); } -} \ No newline at end of file +} -- cgit 1.5.1