about summary refs log tree commit diff
path: root/LibMatrix/Filters
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-03-26 11:13:59 +0100
committerRory& <root@rory.gay>2025-03-26 11:13:59 +0100
commitff13e64dca922550eb6a955de0690d841590a9b0 (patch)
tree2298f5b7f78bbe6777d963c6f922455290822174 /LibMatrix/Filters
parentRename FullState to AlwaysIncludeAllRooms in synchelper, to make it less conf... (diff)
downloadLibMatrix-ff13e64dca922550eb6a955de0690d841590a9b0.tar.xz
Split out invite context, add empty filter constants
Diffstat (limited to 'LibMatrix/Filters')
-rw-r--r--LibMatrix/Filters/SyncFilter.cs15
1 files changed, 14 insertions, 1 deletions
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<string>? NotSenders { get; set; } = notSenders; + + public static readonly EventFilter Empty = new(limit: 0, senders: [], types: []); } -} \ No newline at end of file +}