Add support for ACI safety numbers behind a feature flag
This commit is contained in:
parent
42cd8ce792
commit
c1580a5eb3
38 changed files with 1392 additions and 204 deletions
19
ts/util/isSafetyNumberNotAvailable.ts
Normal file
19
ts/util/isSafetyNumberNotAvailable.ts
Normal 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;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue