Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6102 from matrix-org/gsouquet/17469
Browse files Browse the repository at this point in the history
Fix message preview not up to date
  • Loading branch information
germain-gg authored May 26, 2021
2 parents e3a9e46 + 934af23 commit 7ab3193
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/stores/room-list/MessagePreviewStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ export class MessagePreviewStore extends AsyncStoreWithClient<IState> {

if (payload.action === 'MatrixActions.Room.timeline' || payload.action === 'MatrixActions.Event.decrypted') {
const event = payload.event; // TODO: Type out the dispatcher
if (!this.previews.has(event.getRoomId()) || !event.isLiveEvent) return; // not important
const isHistoricalEvent = payload.hasOwnProperty("isLiveEvent") && !payload.isLiveEvent
if (!this.previews.has(event.getRoomId()) || isHistoricalEvent) return; // not important
await this.generatePreview(this.matrixClient.getRoom(event.getRoomId()), TAG_ANY);
}
}
Expand Down

0 comments on commit 7ab3193

Please sign in to comment.