Ensure that media messages are cached when loaded from convo settings
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
export type RateLimitedErrorPayloadType = Readonly<{
|
export type RateLimitedErrorPayloadType = Readonly<{
|
||||||
// eslint-disable-next-line camelcase
|
|
||||||
retry_after?: number;
|
retry_after?: number;
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
@@ -2218,6 +2218,11 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
|
|||||||
limit,
|
limit,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Cache these messages in memory to ensure Lightbox can find them
|
||||||
|
messages.forEach(message => {
|
||||||
|
window.MessageController.register(message.id, message);
|
||||||
|
});
|
||||||
|
|
||||||
const loadedRecentMediaItems = messages
|
const loadedRecentMediaItems = messages
|
||||||
.filter(message => message.attachments !== undefined)
|
.filter(message => message.attachments !== undefined)
|
||||||
.reduce(
|
.reduce(
|
||||||
|
Reference in New Issue
Block a user