diff options
author | Emma [it/its]@Rory& <root@rory.gay> | 2024-01-31 12:09:28 +0100 |
---|---|---|
committer | Emma [it/its]@Rory& <root@rory.gay> | 2024-01-31 12:09:28 +0100 |
commit | 9f8d0c85c54b4715974994aea52562072d6f1751 (patch) | |
tree | ce5eaf47b02fb82bc99236b926eb9948322745f7 /LibMatrix/Filters/SyncFilter.cs | |
parent | Get full state event (diff) | |
download | LibMatrix-9f8d0c85c54b4715974994aea52562072d6f1751.tar.xz |
Better sync filter support, named filters, error handling
Diffstat (limited to '')
-rw-r--r-- | LibMatrix/Filters/SyncFilter.cs | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/LibMatrix/Filters/SyncFilter.cs b/LibMatrix/Filters/SyncFilter.cs index b05f6b4..5ffef4d 100644 --- a/LibMatrix/Filters/SyncFilter.cs +++ b/LibMatrix/Filters/SyncFilter.cs @@ -24,6 +24,15 @@ public class SyncFilter { [JsonPropertyName("timeline")] public StateFilter? Timeline { get; set; } + + [JsonPropertyName("rooms")] + public List<string>? Rooms { get; set; } + + [JsonPropertyName("not_rooms")] + public List<string>? NotRooms { get; set; } + + [JsonPropertyName("include_leave")] + public bool? IncludeLeave { get; set; } public class StateFilter(bool? containsUrl = null, bool? includeRedundantMembers = null, bool? lazyLoadMembers = null, List<string>? rooms = null, List<string>? notRooms = null, bool? unreadThreadNotifications = null, @@ -66,17 +75,4 @@ public class SyncFilter { [JsonPropertyName("not_senders")] public List<string>? NotSenders { get; set; } = notSenders; } -} - -public static class ExampleFilters { - public static readonly SyncFilter Limit1Filter = new() { - Presence = new(limit: 1), - Room = new() { - AccountData = new(limit: 1), - Ephemeral = new(limit: 1), - State = new(limit: 1), - Timeline = new(limit: 1), - }, - AccountData = new(limit: 1) - }; -} +} \ No newline at end of file |