-
Notifications
You must be signed in to change notification settings - Fork 56
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
Support inviting, kicking and dealing with rooms in Invite state #83
Conversation
A cherry-pick from the kitsune-apigen branch; a family of toJson() and fromJson<>() functions to unify conversion of data back and forth.
Actual usage will come with the next commit.
Kicking and inviting use generated job classes. Rooms in Invite state are stored separately in the hash from those in Join/Leave state because The Spec says so. For clients, this means that the same room may appear twice in the rooms map if it's been left and then the user was again invited to it. The code in Quaternion that properly processes this will arrive shortly.
GitHub apparently has a bug calculating the difference between files - changes in |
joinedRoom() and leftRoom() now pass the preempted Invite state of the room as well; roomMap() only returns Invite and Join rooms, not Leave.
…itions Notably: * setJoinState() invocation has been missing from the previous code * processing invites did not take into account that a Leave state may already exist, thereby forcing clients that display left rooms to look through their records just in case they have to replace a Leave with Invite. * joinedRoom() was emitted even when the room is not newly joined.
9195480
to
726f8d4
Compare
Partially overwrote the branch to get rid of the irrelevant |
With not much activity around, I think I'll expedite things a little and merge one day earlier. |
This PR provides necessary plumbing in
Connection
so that it could process and advertise all things around inviting, as well as room state changes from Invite to Join or Leave (the spec is a bit quirky on that, see the comment oninvite_state
for /sync). This is also the first PR to introduce jobs that are automatically generated from the Matrix CS API spec (so far they are as simple asInviteJob
andKickJob
).Partially addresses #38
Closes #33