You've already forked matrix-js-sdk
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:
@@ -515,7 +515,7 @@ export class EventTimelineSet extends EventEmitter {
|
|||||||
* @param {MatrixEvent} event Event to be added
|
* @param {MatrixEvent} event Event to be added
|
||||||
* @param {string?} duplicateStrategy 'ignore' or 'replace'
|
* @param {string?} duplicateStrategy 'ignore' or 'replace'
|
||||||
* @param {boolean} fromCache whether the sync response came from cache
|
* @param {boolean} fromCache whether the sync response came from cache
|
||||||
* @param {boolean} fromCache whether the sync response came from cache
|
* @param roomState the state events to reconcile metadata from
|
||||||
*/
|
*/
|
||||||
public addLiveEvent(
|
public addLiveEvent(
|
||||||
event: MatrixEvent,
|
event: MatrixEvent,
|
||||||
|
|||||||
@@ -73,6 +73,10 @@ export class Thread extends EventEmitter {
|
|||||||
this.root = event.getId();
|
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);
|
const roomState = this.room.getLiveTimeline().getState(EventTimeline.FORWARDS);
|
||||||
|
|
||||||
event.setThread(this);
|
event.setThread(this);
|
||||||
|
|||||||
Reference in New Issue
Block a user