mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-13 04:06:54 +00:00
Merge remote-tracking branch 'origin/main' into lake/feature/shear-unused-deps
This commit is contained in:
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"
|
||||
|
||||
@@ -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.
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user