Skip to content
Snippets Groups Projects
Unverified Commit bef4fe50 authored by Timo Kösters's avatar Timo Kösters
Browse files

fix: better migration, force e2ee device key updates

parent 9152b877
No related branches found
No related tags found
No related merge requests found
......@@ -563,7 +563,8 @@ async fn sync_helper(
}
// Save the state after this sync so we can send the correct state diff next sync
db.rooms.associate_token_shortstatehash(&room_id, next_batch, current_shortstatehash)?;
db.rooms
.associate_token_shortstatehash(&room_id, next_batch, current_shortstatehash)?;
let joined_room = sync_events::JoinedRoom {
account_data: sync_events::RoomAccountData {
......
......@@ -710,6 +710,12 @@ pub async fn load_or_create(config: &Config) -> Result<Arc<TokioRwLock<Self>>> {
.insert(&shortstatekey, &statekey)?;
}
// Force E2EE device list updates so we can send them over federation
for user_id in db.users.iter().filter_map(|r| r.ok()) {
db.users
.mark_device_key_update(&user_id, &db.rooms, &db.globals)?;
}
db.globals.bump_database_version(10)?;
println!("Migration: 9 -> 10 finished");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment