Fix possible crash when a contact merge results in no UUID.

After merging contacts, it's possible that we don't have a valid
UUID. We need to be careful not to use it.

Kind of a bummer, but the storage sync flow is currently the only flow
where we have this 'possibly not valid UUID'. In the future we should
probably use something else instead of a SignalServiceAddress to keep
that abstraction clean.
This commit is contained in:
Greyson Parrelli
2021-09-01 10:46:42 -04:00
parent 3c177c4883
commit 1819af3000
2 changed files with 14 additions and 7 deletions
@@ -55,6 +55,10 @@ public class SignalServiceAddress {
return uuid;
}
public boolean hasValidUuid() {
return !uuid.equals(UuidUtil.UNKNOWN_UUID);
}
public String getIdentifier() {
return uuid.toString();
}