From aa219dcfffe2d43cbda26b9fcd69cfd0778a0262 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Sat, 14 Feb 2026 22:49:50 -0500 Subject: [PATCH] matrix: update --- services/matrix.nix | 6 +-- services/sliding-sync-fix.patch | 93 --------------------------------- 2 files changed, 3 insertions(+), 96 deletions(-) delete mode 100644 services/sliding-sync-fix.patch diff --git a/services/matrix.nix b/services/matrix.nix index 20db87b..e0fe7ea 100644 --- a/services/matrix.nix +++ b/services/matrix.nix @@ -12,8 +12,8 @@ let domain = "forgejo.ellis.link"; owner = "continuwuation"; repo = "continuwuity"; - rev = "89ad809270dc0dbf428858a466aa9b90e9a8dccf"; - hash = "sha256-fXLbuCkRGYljWXbCyDvczezZ3Zo8SCPh5sx1gZChccw="; + rev = "57b21c1b322bd6ab9650c04e9b5d81932b9e35c3"; + hash = "sha256-ehrRlx15Of2XVPC6kNFx/f9lpn0SHkbtqkNZAskOv18="; }; in pkgs.matrix-continuwuity.overrideAttrs (old: { @@ -25,7 +25,7 @@ let }; patches = (old.patches or [ ]) ++ [ - ./sliding-sync-fix.patch + ]; }); in diff --git a/services/sliding-sync-fix.patch b/services/sliding-sync-fix.patch deleted file mode 100644 index 8a28a1f..0000000 --- a/services/sliding-sync-fix.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff --git a/src/api/client/sync/v5.rs b/src/api/client/sync/v5.rs -index 8976fd02..df2f5844 100644 ---- a/src/api/client/sync/v5.rs -+++ b/src/api/client/sync/v5.rs -@@ -30,7 +30,8 @@ - api::client::sync::sync_events::{self, DeviceLists, UnreadNotificationsCount}, - directory::RoomTypeFilter, - events::{ -- AnyRawAccountDataEvent, AnySyncEphemeralRoomEvent, StateEventType, TimelineEventType, -+ AnyRawAccountDataEvent, AnySyncEphemeralRoomEvent, AnySyncStateEvent, StateEventType, -+ TimelineEventType, - room::member::{MembershipState, RoomMemberEventContent}, - typing::TypingEventContent, - }, -@@ -533,6 +534,9 @@ async fn process_rooms<'a, Rooms>( - } - }); - -+ let required_state = -+ collect_required_state(services, room_id, required_state_request).await; -+ - let room_events: Vec<_> = timeline_pdus - .iter() - .stream() -@@ -551,21 +555,6 @@ async fn process_rooms<'a, Rooms>( - } - } - -- let required_state = required_state_request -- .iter() -- .stream() -- .filter_map(|state| async move { -- services -- .rooms -- .state_accessor -- .room_state_get(room_id, &state.0, &state.1) -- .await -- .map(Event::into_format) -- .ok() -- }) -- .collect() -- .await; -- - // Heroes - let heroes: Vec<_> = services - .rooms -@@ -689,6 +678,46 @@ async fn process_rooms<'a, Rooms>( - Ok(rooms) - } - -+/// Collect the required state events for a room -+async fn collect_required_state( -+ services: &Services, -+ room_id: &RoomId, -+ required_state_request: &BTreeSet, -+) -> Vec> { -+ let mut required_state = Vec::new(); -+ for (event_type, state_key) in required_state_request { -+ // Resolve wild-card sentinel issue -+ // Addresses: https://forgejo.ellis.link/continuwuation/continuwuity/issues/1306 -+ if state_key.as_str() == "*" { -+ if let Ok(keys) = services -+ .rooms -+ .state_accessor -+ .room_state_keys(room_id, event_type) -+ .await -+ { -+ for key in keys { -+ if let Ok(event) = services -+ .rooms -+ .state_accessor -+ .room_state_get(room_id, event_type, &key) -+ .await -+ { -+ required_state.push(Event::into_format(event)); -+ } -+ } -+ } -+ } else if let Ok(event) = services -+ .rooms -+ .state_accessor -+ .room_state_get(room_id, event_type, state_key) -+ .await -+ { -+ required_state.push(Event::into_format(event)); -+ } -+ } -+ required_state -+} -+ - async fn collect_typing_events( - services: &Services, - sender_user: &UserId,