Ensure GV1->GV2 migrations work via group links.
This commit is contained in:
parent
9cd1a12b6a
commit
944a180b68
1 changed files with 8 additions and 0 deletions
|
@ -763,9 +763,17 @@ final class GroupManagerV2 {
|
||||||
alreadyAMember = true;
|
alreadyAMember = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Optional<GroupDatabase.GroupRecord> unmigratedV1Group = groupDatabase.getGroupV1ByExpectedV2(groupId);
|
||||||
|
|
||||||
|
if (unmigratedV1Group.isPresent()) {
|
||||||
|
Log.i(TAG, "Group link was for a migrated V1 group we know about! Migrating it and using that as the base.");
|
||||||
|
GroupsV1MigrationUtil.performLocalMigration(context, unmigratedV1Group.get().getId().requireV1());
|
||||||
|
}
|
||||||
|
|
||||||
DecryptedGroup decryptedGroup = createPlaceholderGroup(joinInfo, requestToJoin);
|
DecryptedGroup decryptedGroup = createPlaceholderGroup(joinInfo, requestToJoin);
|
||||||
|
|
||||||
Optional<GroupDatabase.GroupRecord> group = groupDatabase.getGroup(groupId);
|
Optional<GroupDatabase.GroupRecord> group = groupDatabase.getGroup(groupId);
|
||||||
|
|
||||||
if (group.isPresent()) {
|
if (group.isPresent()) {
|
||||||
Log.i(TAG, "Group already present locally");
|
Log.i(TAG, "Group already present locally");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue