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

appservice: Add join_room_by_id(_or_alias) #280

Closed

Conversation

johannescpk
Copy link
Contributor

@johannescpk johannescpk commented Jun 21, 2021

Adds an appservice-specific way of joining rooms that makes sure room state is synced once (via the room /state C2S API) before the method returns so that we have a valid state before proceeding.

This still feels a bit brittle, it might actually make more sense to have a low-level functionality that checks for proper room state, that could also cover the case of syncing state for rooms that are already joined but state store was not persisted, which the regular Client does cover through sync* methods when there was no sync before the first one. But it should be OK for a first iteration and having the tests for it makes sense anyway.

Part of #228

@johannescpk
Copy link
Contributor Author

johannescpk commented Jun 21, 2021

Putting this into draft because an idea just came to mind how this maybe could get solved directly near the the store level instead of "overwriting" individual methods like join_room_by_id. Basically, when a transaction event comes in, the state for a room is "empty" and we're in appservice mode, then make sure to call the /state API for the room once to refresh its state, which should also cover the "already joined but state store wasn't persisted" case. Have to see whether that works out.

@johannescpk johannescpk marked this pull request as draft June 21, 2021 21:09
@johannescpk johannescpk mentioned this pull request Aug 3, 2021
2 tasks
@johannescpk
Copy link
Contributor Author

johannescpk commented Aug 3, 2021

Superseded by #303

@johannescpk johannescpk closed this Aug 3, 2021
@johannescpk johannescpk deleted the appservice/feature/join-room branch August 3, 2021 15:18
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.

1 participant