Allow adding to a group by phone number
This commit is contained in:
parent
76a1a805ef
commit
9568d5792e
49 changed files with 1842 additions and 693 deletions
19
ts/util/uuidFetchState.ts
Normal file
19
ts/util/uuidFetchState.ts
Normal 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}`]);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue