Add the ability to migrate GV1 groups to GV2.

Co-authored-by: Alan Evans <alan@signal.org>
This commit is contained in:
Greyson Parrelli
2020-10-15 15:49:09 -04:00
committed by Alan Evans
parent 2d1bf33902
commit 6bb9d27d4e
34 changed files with 818 additions and 132 deletions

View File

@@ -58,7 +58,7 @@ public class PushProcessMessageQueueJobMigration extends JobMigration {
Log.i(TAG, "Migrating a group message.");
try {
GroupId groupId = GroupUtil.idFromGroupContext(content.getDataMessage().get().getGroupContext().get());
Recipient recipient = Recipient.externalGroup(context, groupId);
Recipient recipient = Recipient.externalGroupExact(context, groupId);
suffix = recipient.getId().toQueueKey();
} catch (BadGroupIdException e) {
@@ -75,7 +75,7 @@ public class PushProcessMessageQueueJobMigration extends JobMigration {
GroupId exceptionGroup = GroupId.parseNullableOrThrow(data.getStringOrDefault("exception_groupId", null));
if (exceptionGroup != null) {
suffix = Recipient.externalGroup(context, exceptionGroup).getId().toQueueKey();
suffix = Recipient.externalGroupExact(context, exceptionGroup).getId().toQueueKey();
} else if (exceptionSender != null) {
suffix = Recipient.external(context, exceptionSender).getId().toQueueKey();
}