Allow adding to a group by phone number

This commit is contained in:
Fedor Indutny 2022-04-04 17:38:22 -07:00 committed by GitHub
parent 76a1a805ef
commit 9568d5792e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 1842 additions and 693 deletions

19
ts/util/uuidFetchState.ts Normal file
View file

@ -0,0 +1,19 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
export type UUIDFetchStateKeyType = `${'username' | 'e164'}:${string}`;
export type UUIDFetchStateType = Record<UUIDFetchStateKeyType, boolean>;
export const isFetchingByUsername = (
fetchState: UUIDFetchStateType,
username: string
): boolean => {
return Boolean(fetchState[`username:${username}`]);
};
export const isFetchingByE164 = (
fetchState: UUIDFetchStateType,
e164: string
): boolean => {
return Boolean(fetchState[`e164:${e164}`]);
};