Files
Desktop/ts/util/getSendTarget.std.ts
2026-03-30 12:42:37 -07:00

15 lines
397 B
TypeScript

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