Improve quoted attachment typings

This commit is contained in:
trevor-signal 2024-05-23 17:06:41 -04:00 committed by GitHub
parent 38226115a4
commit 5f0080a7d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 98 additions and 97 deletions

13
ts/model-types.d.ts vendored
View file

@ -14,7 +14,11 @@ import type { ReadStatus } from './messages/MessageReadStatus';
import type { SendStateByConversationId } from './messages/MessageSendState';
import type { GroupNameCollisionsWithIdsByTitle } from './util/groupMemberNameCollisions';
import type { AttachmentDraftType, AttachmentType } from './types/Attachment';
import type {
AttachmentDraftType,
AttachmentType,
ThumbnailType,
} from './types/Attachment';
import type { EmbeddedContactType } from './types/EmbeddedContact';
import { SignalService as Proto } from './protobuf';
import type { AvatarDataType, ContactAvatarType } from './types/Avatar';
@ -73,16 +77,15 @@ export type GroupMigrationType = {
invitedMemberCount?: number;
};
export type QuotedAttachment = {
export type QuotedAttachmentType = {
contentType: MIMEType;
fileName?: string;
thumbnail?: AttachmentType;
thumbnail?: ThumbnailType;
};
export type QuotedMessageType = {
// TODO DESKTOP-3826
// eslint-disable-next-line @typescript-eslint/no-explicit-any
attachments: ReadonlyArray<any>;
attachments: ReadonlyArray<QuotedAttachmentType>;
payment?: AnyPaymentEvent;
// `author` is an old attribute that holds the author's E164. We shouldn't use it for
// new messages, but old messages might have this attribute.