Remove pointless double deserialization

next
Jonas Platte 2021-06-17 20:29:02 +02:00
parent 7fa54e4411
commit af2ce5803e
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67
1 changed files with 1 additions and 3 deletions

View File

@ -286,10 +286,8 @@ pub async fn sync_events_route(
.filter(|(_, pdu)| pdu.kind == EventType::RoomMember)
.map(|(_, pdu)| {
let content = serde_json::from_value::<
Raw<ruma::events::room::member::MemberEventContent>,
ruma::events::room::member::MemberEventContent,
>(pdu.content.clone())
.expect("Raw::from_value always works")
.deserialize()
.map_err(|_| {
Error::bad_database("Invalid member event in database.")
})?;