Introduce Service Id Types
Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
parent
414c0a58d3
commit
366b875fd2
269 changed files with 5832 additions and 5550 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue