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

index 787ffa7..7cb6428 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 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,9 @@ public class SyncFilter { [JsonPropertyName("unread_thread_notifications")] public bool? UnreadThreadNotifications { get; set; } = unreadThreadNotifications; + + // ReSharper disable once MemberHidesStaticFromOuterClass + public new static StateFilter Empty => new(limit: 0, senders: [], types: [], rooms: []); } } @@ -83,5 +95,7 @@ public class SyncFilter { [JsonPropertyName("not_senders")] public List<string>? NotSenders { get; set; } = notSenders; + + public static EventFilter Empty => new(limit: 0, senders: [], types: []); } -} \ No newline at end of file +}