Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle state events in 'timeline' #199

Merged
merged 3 commits into from May 14, 2018
Merged

Handle state events in 'timeline' #199

merged 3 commits into from May 14, 2018

Conversation

ghost
Copy link

@ghost ghost commented Apr 24, 2018

Fixes #195 (2nd attempt)

Although the actual fix ended up being only 2 simple extra lines, there's some pre-work. Even the fix needed an extra line to repair the test which was actually asserting the wrong behaviour.

Had to refactor the Enum replacement so I could refer to its constants in the room module, and managed to make it simpler using only 5 SLOC.

Moved _process_state_event to the room class as well, which really benefited the next patch needing only 2 SLOC.

Suggest a non-squashing merge for this PR.

Matrixcoffee added 3 commits April 24, 2018 00:55
So we can have full instances of our enum class instead of bare ints.
State events can and should arrive via the timeline. The contents of 'state' in
the sync response are actually the state at the beginning of 'timeline'.

Fixed the test which was validating the wrong behavour (ignoring timeline).

Spec: https://matrix.org/docs/spec/client_server/r0.3.0.html#syncing

Fixes: #195 State events can arrive both through "state" and "timeline"
@ghost ghost mentioned this pull request Apr 24, 2018
@ghost
Copy link
Author

ghost commented Apr 24, 2018

Signed-off-by: Маrtіn vаո Βeіlеn (@Coffee:matrix.org)

@non-Jedi
Copy link
Collaborator

LGTM. Thanks!

@non-Jedi non-Jedi merged commit 8e156c0 into matrix-org:master May 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

State events can arrive both through «state» and «timeline»
1 participant