also persist state events in timeline

This commit is contained in:
Bruno Windels 2019-02-16 02:55:24 +01:00
parent f7789d343a
commit be8544aa48

View file

@ -51,5 +51,15 @@ export default class RoomPersister {
txn.roomState.setStateEvent(this._roomId, event)
}
}
if (timeline.events) {
if (state.events) {
for (const event of timeline.events) {
if (typeof event.state_key === "string") {
txn.roomState.setStateEvent(this._roomId, event);
}
}
}
}
}
}