1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2024-08-18 14:04:40 +02:00

Fix join panic bug

This commit is contained in:
Nyaaori 2021-11-07 07:57:15 +00:00
parent 2a749c1e99
commit 86177faae7
No known key found for this signature in database
GPG key ID: 50C66D0980648414
2 changed files with 2 additions and 2 deletions

View file

@ -934,7 +934,7 @@ pub(crate) async fn invite_helper<'a>(
unsigned.insert("prev_content".to_owned(), prev_pdu.content.clone());
unsigned.insert(
"prev_sender".to_owned(),
serde_json::from_str(prev_pdu.sender.as_str()).expect("UserId is valid string"),
to_raw_value(&prev_pdu.sender).expect("UserId is valid"),
);
}

View file

@ -2721,7 +2721,7 @@ pub fn create_join_event_template_route(
unsigned.insert("prev_content".to_owned(), prev_pdu.content.clone());
unsigned.insert(
"prev_sender".to_owned(),
serde_json::from_str(prev_pdu.sender.as_str()).expect("UserId is valid string"),
to_raw_value(&prev_pdu.sender).expect("UserId is valid"),
);
}