Ensure that media messages are cached when loaded from convo settings
This commit is contained in:
parent
b98836d0b3
commit
ca638dd44f
2 changed files with 5 additions and 1 deletions
|
@ -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(
|
||||||
|
|
Loading…
Add table
Reference in a new issue