1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-04 05:02:41 +03:00

Add context to explain why we fetch roomstate in threads

This commit is contained in:
Germain Souquet
2021-09-22 17:36:12 +01:00
parent f8ec445ff0
commit c748aebfc5
2 changed files with 5 additions and 1 deletions

View File

@@ -73,6 +73,10 @@ export class Thread extends EventEmitter {
this.root = event.getId();
}
// all the relevant membership info to hydrate events with a sender
// is held in the main room timeline
// We want to fetch the room state from there and pass it down to this thread
// timeline set to let it reconcile an event with its relevant RoomMember
const roomState = this.room.getLiveTimeline().getState(EventTimeline.FORWARDS);
event.setThread(this);