1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2024-11-04 17:29:14 +01:00

Merge branch 'fix/bad-uid-crash' into 'next'

Fix crash when a bad user ID is in the database

See merge request famedly/conduit!334
This commit is contained in:
Timo Kösters 2022-03-31 19:23:41 +00:00
commit 1219535e56

View file

@ -405,10 +405,11 @@ async fn sync_helper(
continue;
}
};
lazy_loaded.insert(
UserId::parse(state_key.as_ref())
.expect("they are in timeline_users, so they should be correct"),
);
// This check is in case a bad user ID made it into the database
if let Ok(uid) = UserId::parse(state_key.as_ref()) {
lazy_loaded.insert(uid);
}
state_events.push(pdu);
}
}