refactor various patterns for serde_json::from_ elim

bump ruma

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-10-03 09:57:43 +00:00 committed by strawberry
parent 55c85f6851
commit d526db681f
9 changed files with 64 additions and 96 deletions

View file

@ -528,12 +528,8 @@ impl Service {
for pdu in pdus {
// Redacted events are not notification targets (we don't send push for them)
if let Some(unsigned) = &pdu.unsigned {
if let Ok(unsigned) = serde_json::from_str::<serde_json::Value>(unsigned.get()) {
if unsigned.get("redacted_because").is_some() {
continue;
}
}
if pdu.contains_unsigned_property("redacted_because", serde_json::Value::is_string) {
continue;
}
let rules_for_user = self