mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-25 04:36:46 +00:00
Migrate schema to service ids
This commit is contained in:
committed by
Jamie Kyle
parent
71958f8a01
commit
8b0da36caa
@@ -2,16 +2,17 @@
|
||||
// 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;
|
||||
uuid?: string;
|
||||
serviceId?: ServiceIdString;
|
||||
}): boolean {
|
||||
const { id, uuid } = conversation;
|
||||
const { id, serviceId } = conversation;
|
||||
|
||||
if (uuid) {
|
||||
return uuid === SIGNAL_ACI;
|
||||
if (serviceId) {
|
||||
return serviceId === SIGNAL_ACI;
|
||||
}
|
||||
|
||||
return window.ConversationController.isSignalConversation(id);
|
||||
return window.ConversationController.isSignalConversationId(id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user