1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2024-10-04 00:58:52 +02:00

fix: show warning for invalid user ids

This commit is contained in:
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

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.")
})?;