fix: redacts can't error anymore

This commit is contained in:
Timo Kösters 2022-02-10 20:59:11 +01:00
parent 9cfef51af3
commit 6602f6114c
No known key found for this signature in database
GPG key ID: 356E705610F626D5
2 changed files with 10 additions and 8 deletions

View file

@ -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.