Introduce Service Id Types

Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
Fedor Indutny 2023-08-10 18:43:33 +02:00 committed by Jamie Kyle
parent 414c0a58d3
commit 366b875fd2
269 changed files with 5832 additions and 5550 deletions

View file

@ -2,10 +2,13 @@
// SPDX-License-Identifier: AGPL-3.0-only
import type { ConversationAttributesType } from '../model-types.d';
import type { ServiceIdString } from '../types/ServiceId';
export function getSendTarget({
uuid,
e164,
}: Pick<ConversationAttributesType, 'uuid' | 'e164'>): string | undefined {
return uuid || e164;
pni,
}: Pick<ConversationAttributesType, 'uuid' | 'pni'>):
| ServiceIdString
| undefined {
return uuid || pni;
}