diff --git a/crates/matrix-sdk-base/src/store/migration_helpers.rs b/crates/matrix-sdk-base/src/store/migration_helpers.rs index 1943b6578ae..a2dd5584e19 100644 --- a/crates/matrix-sdk-base/src/store/migration_helpers.rs +++ b/crates/matrix-sdk-base/src/store/migration_helpers.rs @@ -38,7 +38,7 @@ use ruma::{ }, EmptyStateKey, EventContent, RedactContent, StateEventContent, StateEventType, }, - OwnedRoomId, RoomId, + OwnedRoomId, OwnedUserId, RoomId, }; use serde::{Deserialize, Serialize}; @@ -156,7 +156,7 @@ fn encryption_state_default() -> bool { struct BaseRoomInfoV1 { avatar: Option>, canonical_alias: Option>, - dm_targets: HashSet, + dm_targets: HashSet, encryption: Option, guest_access: Option>, history_visibility: Option>, @@ -201,12 +201,17 @@ impl BaseRoomInfoV1 { MinimalStateEvent::Redacted(ev) => MinimalStateEvent::Redacted(ev), }); + let mut dm_targets_converted = HashSet::new(); + for dm_target in dm_targets { + dm_targets_converted.insert(OwnedDirectUserIdentifier::from(dm_target)); + } + Box::new(BaseRoomInfo { avatar, beacons: BTreeMap::new(), canonical_alias, create, - dm_targets, + dm_targets: dm_targets_converted, encryption, guest_access, history_visibility,