fix: show warning for invalid user ids

next
Timo Kösters 2021-04-12 10:12:52 +02:00
parent a961732f5f
commit 1dc85895a7
No known key found for this signature in database
GPG Key ID: 24DA7517711A2BA4
1 changed files with 2 additions and 1 deletions

View File

@ -595,7 +595,8 @@ async fn join_room_by_id_helper(
db.rooms.add_pdu_outlier(&pdu)?;
if let Some(state_key) = &pdu.state_key {
if pdu.kind == EventType::RoomMember {
let target_user_id = UserId::try_from(state_key.clone()).map_err(|_| {
let target_user_id = UserId::try_from(state_key.clone()).map_err(|e| {
warn!("Invalid user id in send_join response: {}: {}", state_key, e);
Error::BadServerResponse("Invalid user id in send_join response.")
})?;