You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
get state events before we nuke the roomstate
This commit is contained in:
@@ -180,8 +180,6 @@ EventTimelineSet.prototype.resetLiveTimeline = function(
|
|||||||
// we just stole it and put it on the new live timeline
|
// we just stole it and put it on the new live timeline
|
||||||
// (If we're resetting all timelines, don't bother because the old live
|
// (If we're resetting all timelines, don't bother because the old live
|
||||||
// timeline is about to be thrown away anyway.
|
// timeline is about to be thrown away anyway.
|
||||||
this._liveTimeline._startState = new RoomState(this._roomId);
|
|
||||||
this._liveTimeline._endState = new RoomState(this._roomId);
|
|
||||||
const evMap = this._liveTimeline.getState(EventTimeline.FORWARDS).events;
|
const evMap = this._liveTimeline.getState(EventTimeline.FORWARDS).events;
|
||||||
const events = [];
|
const events = [];
|
||||||
for (const evtype in evMap) {
|
for (const evtype in evMap) {
|
||||||
@@ -195,6 +193,8 @@ EventTimelineSet.prototype.resetLiveTimeline = function(
|
|||||||
events.push(evMap[evtype][stateKey]);
|
events.push(evMap[evtype][stateKey]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this._liveTimeline._startState = new RoomState(this._roomId);
|
||||||
|
this._liveTimeline._endState = new RoomState(this._roomId);
|
||||||
this._liveTimeline.initialiseState(events);
|
this._liveTimeline.initialiseState(events);
|
||||||
|
|
||||||
this._liveTimeline.setPaginationToken(
|
this._liveTimeline.setPaginationToken(
|
||||||
|
|||||||
Reference in New Issue
Block a user