Files
Desktop/ts/util/isInSystemContacts.std.ts
Fedor Indutny 44076ece79 Rename files
2025-10-16 23:45:44 -07:00

20 lines
523 B
TypeScript

// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
export const isInSystemContacts = ({
type,
name,
systemGivenName,
systemFamilyName,
}: Readonly<{
type?: string;
name?: string;
systemGivenName?: string;
systemFamilyName?: string;
}>): boolean =>
// `direct` for redux, `private` for models and the database
(type === 'direct' || type === 'private') &&
(typeof name === 'string' ||
typeof systemGivenName === 'string' ||
typeof systemFamilyName === 'string');