mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 17:56:01 +03:00
Merge pull request #6098 from matrix-org/gsouquet/skip-generatepreview
Skip generatePreview if event is not part of the live timeline
This commit is contained in:
commit
7e05a7a3a9
1 changed files with 1 additions and 1 deletions
|
@ -176,7 +176,7 @@ 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())) return; // not important
|
||||
if (!this.previews.has(event.getRoomId()) || !event.isLiveEvent) return; // not important
|
||||
await this.generatePreview(this.matrixClient.getRoom(event.getRoomId()), TAG_ANY);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue