signal-desktop/ts/util/isSignalConversation.ts
automated-signal e624759003
Initial logic for release notes
Co-authored-by: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com>
2024-11-27 17:28:51 -08:00

22 lines
597 B
TypeScript

// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { SIGNAL_ACI } from '../types/SignalConversation';
import type { ServiceIdString } from '../types/ServiceId';
export function isSignalConversation(conversation: {
id: string;
serviceId?: ServiceIdString;
}): boolean {
const { id, serviceId } = conversation;
if (serviceId) {
return serviceId === SIGNAL_ACI;
}
return window.ConversationController.isSignalConversationId(id);
}
export function isSignalServiceId(serviceId: ServiceIdString): boolean {
return serviceId === SIGNAL_ACI;
}