fixup! perf(knock): add database cache

iterate over all users in migration
This commit is contained in:
Matthias Ahouansou 2024-07-01 11:23:17 +01:00
parent 960259720b
commit 062f138cfe
No known key found for this signature in database

View file

@ -949,18 +949,7 @@ impl KeyValueDatabase {
} }
if services().globals.database_version()? < 14 { if services().globals.database_version()? < 14 {
for username in services().users.list_local_users()? { for user in services().users.iter().filter_map(Result::ok) {
let user = match UserId::parse_with_server_name(
username.clone(),
services().globals.server_name(),
) {
Ok(u) => u,
Err(e) => {
warn!("Invalid username {username}: {e}");
continue;
}
};
for room in for room in
services() services()
.rooms .rooms