Conversation
Since it must have allowed state to be undefined previously: the test had it as such.
if state can be undefined anyway
Signed-off-by: Michael Telatynski <[email protected]>
Signed-off-by: Michael Telatynski <[email protected]>
|
There are still issues with the local storage.
This was easily testable by reloading a client and seeing all room names to disappear. With the fix from @t3chguy this is not the case anymore. But we still see issues after a reload (loading sync from cache). This can be used to investigate the issue https://pr2767--element-call.netlify.app/ If you are in a call and others join and leave, you reload the client the number at the top left will not be correct. The list of |
|
Thanks for continuing work on this. The changes look good as far as I can see, glad the sync accumulator wasn't too much of a big change to get working. |
…er field Signed-off-by: Michael Telatynski <[email protected]>
…kr/stateafter # Conflicts: # src/embedded.ts
Signed-off-by: Michael Telatynski <[email protected]>
Signed-off-by: Michael Telatynski <[email protected]>
toger5
left a comment
There was a problem hiding this comment.
I only have minor comments. Nice that there is also the test to the sync accumulator
Signed-off-by: Michael Telatynski <[email protected]>
|
Is there anything else we should wait for before merging this? This mentions the EW pr needs to be merged first: element-hq/element-web#28398 |
|
Yes, it will need force merging when I am done with the release process |
Closes #4532
Fixes element-hq/element-web#28536
Fixes #4528
This implements support for
state_afterin sync responses, as per matrix-org/matrix-spec-proposals#4222In this, the events that arrive in the timeline should no longer be added to the state of the room. Instead, all state events arrive explicitly, duplicated, in
state_after. Applying the events instate_aftergives the state of the room after that sync request. This fixes problems where state events in the timeline should not actually change the state of the room, for example if old state events arrive from disconnected homeservers.Synapse impl: element-hq/synapse#17888
This will need aggressive testing against synapse both with and without PR 17888. It's quite an invasive change. I opted to require callers of methods that add timeline events to explicitly specify whether they want the timeline events to apply to state since defaulting to either is not really safe, and this helps us catch all the code paths where it happens.
This changes some interface in the js-sdk and so should probably be considered a breaking change (and I've removed some deprecated interfaces while I'm at it).
Changes to public functions:
SyncApi.injectRoomEvents()- parameters have changedRoom.addLiveEvents()-addLiveEventOptionsparameter is now requiredEventTimeline.addEvent()-toStartOfTimelineis now required; new required optionaddToStateEventTimelineSet.insertEventIntoTimeline()- new required parameteraddToStateEventTimelineSet.addEventToTimeline()- deprecated variants removed;toStartOfTimelineis now required; new required optionaddToStateChecklist
public/exportedsymbols have accurate TSDoc documentation.