From 82417145ff67fae9eac4dbe8137f5b9ef0d222f9 Mon Sep 17 00:00:00 2001 From: Rory& Date: Wed, 7 May 2025 22:18:23 +0200 Subject: MSC4222 emulation for joined rooms? --- LibMatrix/Filters/SyncFilter.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'LibMatrix/Filters/SyncFilter.cs') diff --git a/LibMatrix/Filters/SyncFilter.cs b/LibMatrix/Filters/SyncFilter.cs index 8c66656..7cb6428 100644 --- a/LibMatrix/Filters/SyncFilter.cs +++ b/LibMatrix/Filters/SyncFilter.cs @@ -34,7 +34,7 @@ public class SyncFilter { [JsonPropertyName("include_leave")] public bool? IncludeLeave { get; set; } - private static readonly RoomFilter Empty = new() { + private static RoomFilter Empty => new() { Rooms = [], IncludeLeave = false, AccountData = StateFilter.Empty, @@ -75,7 +75,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: []); + // ReSharper disable once MemberHidesStaticFromOuterClass + public new static StateFilter Empty => new(limit: 0, senders: [], types: [], rooms: []); } } @@ -95,6 +96,6 @@ public class SyncFilter { [JsonPropertyName("not_senders")] public List? NotSenders { get; set; } = notSenders; - public static readonly EventFilter Empty = new(limit: 0, senders: [], types: []); + public static EventFilter Empty => new(limit: 0, senders: [], types: []); } } -- cgit 1.5.1