Skip to content

Commit

Permalink
Ensure that media messages are cached when loaded from convo settings
Browse files Browse the repository at this point in the history
  • Loading branch information
automated-signal committed Nov 29, 2022
1 parent 44b12b5 commit c7f05b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ts/views/conversation_view.tsx
Expand Up @@ -2217,6 +2217,11 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
limit,
});

// Cache these messages in memory to ensure Lightbox can find them
messages.forEach(message => {
window.MessageController.register(message.id, message);
});

const loadedRecentMediaItems = messages
.filter(message => message.attachments !== undefined)
.reduce(
Expand Down

0 comments on commit c7f05b2

Please sign in to comment.