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

@ -4,20 +4,7 @@
import type { ConversationType } from '../state/ducks/conversations';
import { format, isValidNumber } from '../types/PhoneNumber';
type FormattedContact = Partial<ConversationType> &
Pick<
ConversationType,
| 'acceptedMessageRequest'
| 'badges'
| 'id'
| 'isMe'
| 'sharedGroupNames'
| 'title'
| 'type'
| 'unblurredAvatarPath'
>;
const PLACEHOLDER_CONTACT: FormattedContact = {
const PLACEHOLDER_CONTACT: ConversationType = {
acceptedMessageRequest: false,
badges: [],
id: 'placeholder-contact',
@ -27,7 +14,7 @@ const PLACEHOLDER_CONTACT: FormattedContact = {
type: 'direct',
};
export function findAndFormatContact(identifier?: string): FormattedContact {
export function findAndFormatContact(identifier?: string): ConversationType {
if (!identifier) {
return PLACEHOLDER_CONTACT;
}