fix: also fetch prev events that are outliers already

This commit is contained in:
Timo Kösters 2021-08-14 22:50:45 +02:00
parent ecd1e45a44
commit f9a2edc0dd
No known key found for this signature in database
GPG key ID: 356E705610F626D5
2 changed files with 26 additions and 11 deletions

View file

@ -844,6 +844,19 @@ impl Rooms {
.transpose()
}
/// Returns the json of a pdu.
pub fn get_outlier_pdu_json(
&self,
event_id: &EventId,
) -> Result<Option<CanonicalJsonObject>> {
self.eventid_outlierpdu
.get(event_id.as_bytes())?
.map(|pdu| {
serde_json::from_slice(&pdu).map_err(|_| Error::bad_database("Invalid PDU in db."))
})
.transpose()
}
/// Returns the json of a pdu.
pub fn get_non_outlier_pdu_json(
&self,