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