signal-desktop/ts/util/getSendTarget.ts

15 lines
372 B
TypeScript
Raw Normal View History

2022-07-01 00:52:03 +00:00
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { ConversationAttributesType } from '../model-types.d';
import type { ServiceIdString } from '../types/ServiceId';
2022-07-01 00:52:03 +00:00
export function getSendTarget({
uuid,
pni,
}: Pick<ConversationAttributesType, 'uuid' | 'pni'>):
| ServiceIdString
| undefined {
return uuid || pni;
2022-07-01 00:52:03 +00:00
}