signal-desktop/ts/util/isSignalConversation.ts

18 lines
396 B
TypeScript
Raw Normal View History

2022-11-09 02:38:19 +00:00
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
2022-11-09 21:11:45 +00:00
import { SIGNAL_ACI } from '../types/SignalConversation';
2022-11-09 02:38:19 +00:00
export function isSignalConversation(conversation: {
id: string;
uuid?: string;
}): boolean {
const { id, uuid } = conversation;
if (uuid) {
return uuid === SIGNAL_ACI;
}
return window.ConversationController.isSignalConversation(id);
}