signal-desktop/ts/util/ServiceId.ts
Jamie Kyle 17ea2b58de
Fix hover/focus bg overriding active bg in ConversationList
Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
2023-09-18 14:00:26 -07:00

17 lines
561 B
TypeScript

// Copyright 2023 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { Aci, Pni, ServiceId } from '@signalapp/libsignal-client';
import type { AciString, PniString, ServiceIdString } from '../types/ServiceId';
export function toServiceIdObject(serviceId: ServiceIdString): ServiceId {
return ServiceId.parseFromServiceIdString(serviceId);
}
export function toAciObject(aci: AciString): Aci {
return Aci.parseFromServiceIdString(aci);
}
export function toPniObject(pni: PniString): Pni {
return Pni.parseFromServiceIdString(pni);
}