Download your own story attachments. Hydrate story replies on receive

This commit is contained in:
Josh Perez 2022-08-10 14:48:52 -04:00 committed by GitHub
parent 269d170275
commit 5b6874b882
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View file

@ -81,6 +81,7 @@ import { handleMessageSend } from '../util/handleMessageSend';
import { getSendOptions } from '../util/getSendOptions';
import { findAndFormatContact } from '../util/findAndFormatContact';
import {
getAttachmentsForMessage,
getMessagePropStatus,
getPropsForCallHistory,
getPropsForMessage,
@ -357,7 +358,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
return;
}
const attachments = message.get('attachments');
const attachments = getAttachmentsForMessage({ ...message.attributes });
this.set({
storyReplyContext: {
@ -2444,6 +2445,10 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
storyId: dataMessage.storyId,
});
if (storyQuote) {
await this.hydrateStoryContext(storyQuote);
}
const isSupported = !isUnsupportedMessage(message.attributes);
if (!isSupported) {
await message.eraseContents();