Skip to content

Commit

Permalink
Forward: Ensure we get the latest attachments with hydrated data
Browse files Browse the repository at this point in the history
  • Loading branch information
scottnonnenberg-signal committed Jun 28, 2022
1 parent 101d53c commit 6a509ba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ts/views/conversation_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,12 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
if (!message) {
throw new Error(`showForwardMessageModal: Message ${messageId} missing!`);
}
const attachments = getAttachmentsForMessage(message.attributes);

// We need to give it a fresh object because it's memoized by the root object!
const rawAttachments = getAttachmentsForMessage({ ...message.attributes });
const attachments = rawAttachments.filter(attachment =>
Boolean(attachment.url)
);

const doForwardMessage = async (
conversationIds: Array<string>,
Expand Down

0 comments on commit 6a509ba

Please sign in to comment.