Receive support for View Once photos

This commit is contained in:
Scott Nonnenberg 2019-06-26 12:33:13 -07:00
parent fccf1eec30
commit e62a1a7812
38 changed files with 1937 additions and 102 deletions

View file

@ -18,6 +18,7 @@ export type IncomingMessage = Readonly<
decrypted_at?: number;
errors?: Array<any>;
expireTimer?: number;
messageTimer?: number;
flags?: number;
source?: string;
sourceDevice?: number;
@ -46,6 +47,7 @@ export type OutgoingMessage = Readonly<
body?: string;
expires_at?: number;
expireTimer?: number;
messageTimer?: number;
recipients?: Array<string>; // Array<PhoneNumber>
synced: boolean;
} & SharedMessageProperties &

View file

@ -16,6 +16,9 @@ export const initializeAttachmentMetadata = async (
if (message.type === 'verified-change') {
return message;
}
if (message.messageTimer) {
return message;
}
const attachments = message.attachments.filter(
(attachment: Attachment.Attachment) =>