fix: putting global account data works now

This commit is contained in:
Timo Kösters 2021-05-29 10:49:13 +02:00
parent 1fa7ff2eb1
commit 59dd3676d5
No known key found for this signature in database
GPG Key ID: 24DA7517711A2BA4
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ pub async fn set_room_account_data_route(
) -> ConduitResult<set_room_account_data::Response> {
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
let data = serde_json::from_str(body.data.get())
let data = serde_json::from_str::<serde_json::Value>(body.data.get())
.map_err(|_| Error::BadRequest(ErrorKind::BadJson, "Data is invalid."))?;
let event_type = body.event_type.to_string();