chore(sync/v3): More goat sacrifices

This commit is contained in:
Ginger
2025-12-03 16:04:32 +00:00
parent a6d325440c
commit 5b959fca1c
2 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -224,7 +224,7 @@ where
.chain( .chain(
receipts receipts
.ready_take_while(|(_, c, _)| *c <= newest.into_unsigned()) .ready_take_while(|(_, c, _)| *c <= newest.into_unsigned())
.map(|(user_id, ..)| user_id.to_owned()), .map(|(user_id, ..)| user_id),
) )
.collect() .collect()
.await; .await;
+7 -6
View File
@@ -80,6 +80,7 @@ pub(super) async fn load_joined_room(
build_ephemeral(services, sync_context, room_id), build_ephemeral(services, sync_context, room_id),
build_state_and_timeline(services, sync_context, room_id), build_state_and_timeline(services, sync_context, room_id),
) )
.boxed()
.await?; .await?;
if !timeline.is_empty() || !state_events.is_empty() { if !timeline.is_empty() || !state_events.is_empty() {
@@ -193,7 +194,7 @@ async fn build_ephemeral(
} }
} }
return None; None
}; };
// collect the syncing user's private-read marker, if it's changed // collect the syncing user's private-read marker, if it's changed
@@ -367,7 +368,7 @@ async fn fetch_shortstatehashes(
debug_warn!( debug_warn!(
token = last_sync_end_count, token = last_sync_end_count,
"Room has no shortstatehash for this token" "Room has no shortstatehash for this token"
) );
}) })
.ok() .ok()
})) }))
@@ -499,7 +500,7 @@ async fn build_state_events(
last_sync_end_shortstatehash, last_sync_end_shortstatehash,
timeline_start_shortstatehash, timeline_start_shortstatehash,
current_shortstatehash, current_shortstatehash,
&timeline, timeline,
lazily_loaded_members.as_ref(), lazily_loaded_members.as_ref(),
) )
.boxed() .boxed()
@@ -556,7 +557,7 @@ async fn build_notification_counts(
} }
// otherwise, nothing's changed. // otherwise, nothing's changed.
return false; false
}; };
if should_send_notification_counts.await { if should_send_notification_counts.await {
@@ -636,7 +637,7 @@ async fn build_room_summary(
room_id: &RoomId, room_id: &RoomId,
ShortStateHashes { current_shortstatehash, .. }: ShortStateHashes, ShortStateHashes { current_shortstatehash, .. }: ShortStateHashes,
timeline: &TimelinePdus, timeline: &TimelinePdus,
state_events: &Vec<PduEvent>, state_events: &[PduEvent],
joined_since_last_sync: bool, joined_since_last_sync: bool,
) -> Result<Option<RoomSummary>> { ) -> Result<Option<RoomSummary>> {
// determine whether any events in the state or timeline are membership events. // determine whether any events in the state or timeline are membership events.
@@ -692,7 +693,7 @@ async fn build_room_summary(
trace!( trace!(
?joined_member_count, ?joined_member_count,
?invited_member_count, ?invited_member_count,
heroes_length = heroes.as_ref().map(|h| h.len()), heroes_length = heroes.as_ref().map(HashSet::len),
"syncing updated summary" "syncing updated summary"
); );