Merge branch 'redactfix' into 'next'

Redaction fix

Closes #235

See merge request famedly/conduit!298
merge-requests/310/merge
Timo Kösters 2 years ago
commit b8eaa3be85

@ -2147,13 +2147,9 @@ impl Rooms {
.ok_or_else(|| Error::bad_database("PDU ID points to invalid PDU."))?;
pdu.redact(reason)?;
self.replace_pdu(&pdu_id, &pdu)?;
Ok(())
} else {
Err(Error::BadRequest(
ErrorKind::NotFound,
"Event ID does not exist.",
))
}
// If event does not exist, just noop
Ok(())
}
/// Update current membership data.

@ -1571,7 +1571,10 @@ async fn upgrade_outlier_to_timeline_pdu(
soft_fail,
&state_lock,
)
.map_err(|_| "Failed to add pdu to db.".to_owned())?;
.map_err(|e| {
warn!("Failed to add pdu to db: {}", e);
"Failed to add pdu to db.".to_owned()
})?;
// Soft fail, we keep the event as an outlier but don't add it to the timeline
warn!("Event was soft failed: {:?}", incoming_pdu);
@ -1737,7 +1740,10 @@ async fn upgrade_outlier_to_timeline_pdu(
soft_fail,
&state_lock,
)
.map_err(|_| "Failed to add pdu to db.".to_owned())?;
.map_err(|e| {
warn!("Failed to add pdu to db: {}", e);
"Failed to add pdu to db.".to_owned()
})?;
debug!("Appended incoming pdu.");

Loading…
Cancel
Save