refactor(sync/v3): Split load_joined_room into smaller functions

This commit is contained in:
Ginger
2025-11-10 12:37:11 -05:00
parent 3f4749a796
commit 07dfc5528d
9 changed files with 625 additions and 343 deletions
+3 -3
View File
@@ -530,7 +530,7 @@ impl Service {
}
max_edu_count.fetch_max(count, Ordering::Relaxed);
if !self.services.globals.user_is_local(user_id) {
if !self.services.globals.user_is_local(&user_id) {
continue;
}
@@ -554,7 +554,7 @@ impl Service {
let receipt = receipt
.remove(&ReceiptType::Read)
.expect("our read receipts always set this")
.remove(user_id)
.remove(&user_id)
.expect("our read receipts always have the user here");
let receipt_data = ReceiptData {
@@ -562,7 +562,7 @@ impl Service {
event_ids: vec![event_id.clone()],
};
if read.insert(user_id.to_owned(), receipt_data).is_none() {
if read.insert(user_id, receipt_data).is_none() {
*num = num.saturating_add(1);
if *num >= SELECT_RECEIPT_LIMIT {
break;