Add support for ACI safety numbers behind a feature flag

This commit is contained in:
Fedor Indutny 2023-07-13 21:06:42 +02:00 committed by Fedor Indutnyy
parent 42cd8ce792
commit c1580a5eb3
38 changed files with 1392 additions and 204 deletions

View file

@ -0,0 +1,19 @@
// Copyright 2023 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { ConversationType } from '../state/ducks/conversations';
export const isSafetyNumberNotAvailable = (
contact?: ConversationType
): boolean => {
// We have a contact
if (!contact) {
return true;
}
// They have a uuid
if (!contact.uuid) {
return true;
}
// The uuid is not PNI
return contact.pni === contact.uuid;
};