signal-desktop/ts/test-both/helpers/getDefaultConversation.ts

20 lines
542 B
TypeScript

// Copyright 2020 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { v4 as generateUuid } from 'uuid';
import { ConversationType } from '../../state/ducks/conversations';
export function getDefaultConversation(
overrideProps: Partial<ConversationType>
): ConversationType {
return {
id: 'guid-1',
lastUpdated: Date.now(),
markedUnread: Boolean(overrideProps.markedUnread),
e164: '+1300555000',
title: 'Alice',
type: 'direct' as const,
uuid: generateUuid(),
...overrideProps,
};
}