Migrate schema to service ids
This commit is contained in:
parent
71958f8a01
commit
8b0da36caa
258 changed files with 4795 additions and 2613 deletions
|
@ -1,23 +1,25 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import type { ServiceIdString } from '../types/ServiceId';
|
||||
|
||||
export type MinimalConversationType = Readonly<{
|
||||
type?: string;
|
||||
e164?: string;
|
||||
uuid?: string;
|
||||
serviceId?: ServiceIdString;
|
||||
discoveredUnregisteredAt?: number;
|
||||
}>;
|
||||
|
||||
export function isConversationSMSOnly(
|
||||
conversation: MinimalConversationType
|
||||
): boolean {
|
||||
const { e164, uuid, type } = conversation;
|
||||
const { e164, serviceId, type } = conversation;
|
||||
// `direct` for redux, `private` for models and the database
|
||||
if (type !== 'direct' && type !== 'private') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (e164 && !uuid) {
|
||||
if (e164 && !serviceId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue