mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-12-29 05:53:48 +03:00
fix: incremental lazy loading
This commit is contained in:
parent
f285c89006
commit
c6d88359d7
1 changed files with 18 additions and 19 deletions
|
@ -484,6 +484,8 @@ async fn sync_helper(
|
||||||
|
|
||||||
state_events.push(pdu);
|
state_events.push(pdu);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (_, event) in &timeline_pdus {
|
for (_, event) in &timeline_pdus {
|
||||||
if lazy_loaded.contains(&event.sender) {
|
if lazy_loaded.contains(&event.sender) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -496,16 +498,13 @@ async fn sync_helper(
|
||||||
&event.sender,
|
&event.sender,
|
||||||
)? || lazy_load_send_redundant
|
)? || lazy_load_send_redundant
|
||||||
{
|
{
|
||||||
let pdu = match db.rooms.get_pdu(&id)? {
|
if let Some(member_event) = db.rooms.room_state_get(
|
||||||
Some(pdu) => pdu,
|
&room_id,
|
||||||
None => {
|
&EventType::RoomMember,
|
||||||
error!("Pdu in state not found: {}", id);
|
event.sender.as_str(),
|
||||||
continue;
|
)? {
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
lazy_loaded.insert(event.sender.clone());
|
lazy_loaded.insert(event.sender.clone());
|
||||||
state_events.push(pdu);
|
state_events.push(member_event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue