Process incoming story messages

This commit is contained in:
Josh Perez
2022-03-04 16:14:52 -05:00
committed by GitHub
parent df7cdfacc7
commit eb91eb6fec
84 changed files with 4382 additions and 652 deletions

21
ts/model-types.d.ts vendored
View File

@@ -1,4 +1,4 @@
// Copyright 2020-2021 Signal Messenger, LLC
// Copyright 2020-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import * as Backbone from 'backbone';
@@ -69,6 +69,8 @@ export type GroupMigrationType = {
invitedMembers: Array<GroupV2PendingMemberType>;
};
export type PreviewMessageType = Array<WhatIsThis>;
export type QuotedMessageType = {
attachments: Array<typeof window.WhatIsThis>;
// `author` is an old attribute that holds the author's E164. We shouldn't use it for
@@ -83,6 +85,13 @@ export type QuotedMessageType = {
messageId: string;
};
export type StickerMessageType = {
packId: string;
stickerId: number;
packKey: string;
data?: AttachmentType;
};
export type RetryOptions = Readonly<{
type: 'session-reset';
uuid: string;
@@ -164,13 +173,8 @@ export type MessageAttributesType = {
| 'verified-change';
body?: string;
attachments?: Array<AttachmentType>;
preview?: Array<WhatIsThis>;
sticker?: {
packId: string;
stickerId: number;
packKey: string;
data?: AttachmentType;
};
preview?: PreviewMessageType;
sticker?: StickerMessageType;
sent_at: number;
unidentifiedDeliveries?: Array<string>;
contact?: Array<EmbeddedContactType>;
@@ -242,6 +246,7 @@ export type ConversationAttributesType = {
draftAttachments?: Array<AttachmentDraftType>;
draftBodyRanges?: Array<BodyRangeType>;
draftTimestamp?: number | null;
hideStory?: boolean;
inbox_position: number;
isPinned: boolean;
lastMessageDeletedForEveryone: boolean;