2023-07-13 21:06:42 +02:00
|
|
|
// Copyright 2023 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
import type { ConversationType } from '../state/ducks/conversations';
|
2023-09-14 13:04:48 -04:00
|
|
|
import { isAciString } from './isAciString';
|
2023-07-13 21:06:42 +02:00
|
|
|
|
|
|
|
export const isSafetyNumberNotAvailable = (
|
|
|
|
contact?: ConversationType
|
|
|
|
): boolean => {
|
|
|
|
// We have a contact
|
|
|
|
if (!contact) {
|
|
|
|
return true;
|
|
|
|
}
|
2023-08-16 22:54:39 +02:00
|
|
|
|
2023-08-30 21:07:54 +02:00
|
|
|
return !isAciString(contact.serviceId);
|
2023-07-13 21:06:42 +02:00
|
|
|
};
|