Introduce Service Id Types

Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
Fedor Indutny 2023-08-10 18:43:33 +02:00 committed by Jamie Kyle
parent 414c0a58d3
commit 366b875fd2
269 changed files with 5832 additions and 5550 deletions

View file

@ -5,6 +5,7 @@ import { compact, uniq } from 'lodash';
import type { ConversationAttributesType } from '../model-types.d';
import type { ServiceIdString } from '../types/ServiceId';
import { getConversationMembers } from './getConversationMembers';
import { getSendTarget } from './getSendTarget';
import { isDirectConversation, isMe } from './whatTypeOfConversation';
@ -20,7 +21,7 @@ export function getRecipients(
extraConversationsForSend?: ReadonlyArray<string>;
isStoryReply?: boolean;
} = {}
): Array<string> {
): Array<ServiceIdString> {
if (isDirectConversation(conversationAttributes)) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return [getSendTarget(conversationAttributes)!];