Merge remote-tracking branch 'origin/main' into lake/feature/shear-unused-deps

This commit is contained in:
timedout committed 2026-09-13 19:57:41 +01:00
commit 5f31f3fb10
4 files changed
+21 -10

No files matched your search

@@ -1,7 +1,6 @@
name: Update flake hashes
on:
workflow_dispatch:
pull_request:
paths:
- "Cargo.lock"
+1
View File
@@ -0,0 +1 @@
Sliding sync responses no longer include an empty room account data entry for every room in a list's range. Contributed by @eleboucher.
+14 -8
View File
@@ -855,15 +855,21 @@ where
};
if body.extensions.account_data.enabled == Some(true) {
response.extensions.account_data.rooms.insert(
room_id.to_owned(),
services
let room_account_data: Vec<_> = services
.account_data
.changes_since(Some(room_id), sender_user, Some(*roomsince), Some(next_batch))
.ready_filter_map(|e| extract_variant!(e, AnyRawAccountDataEvent::Room))
.collect()
.await;
// An empty entry makes clients treat the room as updated.
if !room_account_data.is_empty() {
response
.extensions
.account_data
.changes_since(Some(room_id), sender_user, Some(*roomsince), Some(next_batch))
.ready_filter_map(|e| extract_variant!(e, AnyRawAccountDataEvent::Room))
.collect()
.await,
);
.rooms
.insert(room_id.to_owned(), room_account_data);
}
}
let last_privateread_update = services
@@ -155,7 +155,12 @@ impl super::Service {
.prev_events()
.stream()
.fold(0_u8, |i, event_id| async move {
if self.services.timeline.pdu_exists(event_id).await {
if self
.services
.timeline
.non_outlier_pdu_exists(event_id)
.await
{
i
} else {
i.expected_add(1)