Migrate schema to service ids

This commit is contained in:
Fedor Indutny 2023-08-16 22:54:39 +02:00 committed by Jamie Kyle
parent 71958f8a01
commit 8b0da36caa
258 changed files with 4795 additions and 2613 deletions

View file

@ -2,6 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import type { ConversationType } from '../state/ducks/conversations';
import { isAciString } from '../types/ServiceId';
export const isSafetyNumberNotAvailable = (
contact?: ConversationType
@ -10,10 +11,6 @@ export const isSafetyNumberNotAvailable = (
if (!contact) {
return true;
}
// They have a uuid
if (!contact.uuid) {
return true;
}
// The uuid is not PNI
return contact.pni === contact.uuid;
return isAciString(contact.serviceId);
};