Migrate schema to service ids
This commit is contained in:
parent
71958f8a01
commit
8b0da36caa
258 changed files with 4795 additions and 2613 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue