While testing GV2 without UUID, fail jobs that hit UuidRecipientError.

master
Alan Evans 2020-05-26 15:33:17 -03:00 committed by Greyson Parrelli
parent c5e7300df2
commit 28bd245b96
1 changed files with 10 additions and 2 deletions

View File

@ -193,7 +193,11 @@ public class Recipient {
return resolved(id);
} else {
throw new UuidRecipientError();
if (!FeatureFlags.uuids() && FeatureFlags.groupsV2()) {
throw new RuntimeException(new UuidRecipientError());
} else {
throw new UuidRecipientError();
}
}
} else if (e164 != null) {
Recipient recipient = resolved(db.getOrInsertFromE164(e164));
@ -272,7 +276,11 @@ public class Recipient {
if (possibleId.isPresent()) {
id = possibleId.get();
} else {
throw new UuidRecipientError();
if (!FeatureFlags.uuids() && FeatureFlags.groupsV2()) {
throw new RuntimeException(new UuidRecipientError());
} else {
throw new UuidRecipientError();
}
}
}
} else if (GroupId.isEncodedGroup(identifier)) {