fix: state resolution bugs

This commit is contained in:
Timo Kösters 2021-05-27 10:47:06 +02:00
parent eeb0b59b76
commit daa1fc90a7
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
3 changed files with 51 additions and 46 deletions

View file

@ -1209,6 +1209,10 @@ pub fn handle_incoming_pdu<'a>(
}
}
}
auth_cache.extend(
map.iter()
.map(|pdu| (pdu.1.event_id.clone(), pdu.1.clone())),
);
auth_events.push(state_auth);
}
@ -1216,7 +1220,7 @@ pub fn handle_incoming_pdu<'a>(
auth_cache.extend(
auth_events
.iter()
.map(|pdus| pdus.iter().map(|pdu| (pdu.event_id().clone(), pdu.clone())))
.map(|pdus| pdus.iter().map(|pdu| (pdu.event_id.clone(), pdu.clone())))
.flatten(),
);
auth_cache.extend(