Make sure that storySendMode is in group types

This commit is contained in:
Fedor Indutny 2022-11-19 00:31:18 -08:00 committed by GitHub
parent fa2fd5eef3
commit a2f1b469ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 101 additions and 110 deletions

View file

@ -8,6 +8,7 @@ import { UUID } from '../../types/UUID';
import type { UUIDStringType } from '../../types/UUID';
import { getRandomColor } from './getRandomColor';
import { ConversationColors } from '../../types/Colors';
import { StorySendMode } from '../../types/Stories';
export const getAvatarPath = (): string =>
sample([
@ -37,9 +38,11 @@ export function getDefaultConversation(
sharedGroupNames: [],
title: `${firstName} ${lastName}`,
titleNoDefault: `${firstName} ${lastName}`,
type: 'direct' as const,
uuid: UUID.generate().toString(),
...overrideProps,
type: 'direct' as const,
acknowledgedGroupNameCollisions: undefined,
storySendMode: undefined,
};
}
@ -70,9 +73,11 @@ export function getDefaultGroup(
memberships,
sharedGroupNames: [],
title: casual.title,
type: 'group' as const,
uuid: UUID.generate().toString(),
acknowledgedGroupNameCollisions: {},
storySendMode: StorySendMode.IfActive,
...overrideProps,
type: 'group' as const,
};
}