Quotes: Check message's conversationId

This commit is contained in:
Scott Nonnenberg 2021-04-14 15:15:57 -07:00 committed by GitHub
parent 97a4361c6f
commit 7d55421d8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 111 additions and 58 deletions

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

@ -52,6 +52,18 @@ export type GroupMigrationType = {
invitedMembers: Array<GroupV2PendingMemberType>;
};
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
// new messages, but old messages might have this attribute.
author?: string;
authorUuid: string;
bodyRanges: BodyRangesType;
id: string;
referencedMessageNotFound: boolean;
text: string;
};
export type MessageAttributesType = {
bodyPending: boolean;
bodyRanges: BodyRangesType;
@ -86,17 +98,7 @@ export type MessageAttributesType = {
message: unknown;
messageTimer: unknown;
profileChange: ProfileNameChangeType;
quote?: {
attachments: Array<typeof window.WhatIsThis>;
// `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.
author?: string;
authorUuid: string;
bodyRanges: BodyRangesType;
id: string;
referencedMessageNotFound: boolean;
text: string;
};
quote?: QuotedMessageType;
reactions?: Array<{
emoji: string;
timestamp: number;