diff --git a/app/src/main/java/org/thoughtcrime/securesms/groups/GroupManagerV2.java b/app/src/main/java/org/thoughtcrime/securesms/groups/GroupManagerV2.java index 8ca785f59e..24e9067bd2 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/groups/GroupManagerV2.java +++ b/app/src/main/java/org/thoughtcrime/securesms/groups/GroupManagerV2.java @@ -763,9 +763,17 @@ final class GroupManagerV2 { alreadyAMember = true; } + Optional 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); Optional group = groupDatabase.getGroup(groupId); + if (group.isPresent()) { Log.i(TAG, "Group already present locally");