Don't show name collisions for system contacts

This commit is contained in:
Evan Hahn 2021-06-02 12:24:22 -05:00 committed by GitHub
parent 84be8288e9
commit 6c6eed0b1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 121 additions and 17 deletions

View file

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