fix: deserialize sync event body
This commit is contained in:
parent
2855d1acdf
commit
f9cfede2a8
4 changed files with 48 additions and 36 deletions
|
@ -84,8 +84,11 @@ where
|
|||
body: t,
|
||||
user_id,
|
||||
// TODO: Can we avoid parsing it again?
|
||||
json_body: serde_json::from_slice(&body)
|
||||
.expect("Ruma already parsed it successfuly"),
|
||||
json_body: if !body.is_empty() {
|
||||
serde_json::from_slice(&body).expect("Ruma already parsed it successfully")
|
||||
} else {
|
||||
serde_json::Value::default()
|
||||
},
|
||||
}),
|
||||
Err(e) => {
|
||||
log::error!("{:?}", e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue