-
Notifications
You must be signed in to change notification settings - Fork 326
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
[Federation] Add an Endpoint for Conversation Member Removal based on Qualified User ID #1697
[Federation] Add an Endpoint for Conversation Member Removal based on Qualified User ID #1697
Conversation
Can we already just make one endpoint then? I don't think it is nice to make clients decide which endpoint to use.
Along with the integration tests, I think it is also OK to break backwards compatibility of parsing JSONs between brig and galley as we upgrade them together. So, I am still not convinced that we need to add another event type. |
@akshaymankar , @pcapriotti : This PR is ready for reviewing. Akshay already made two comments:
|
The problem with having a separate endpoint is that they overlap in the case when you want to leave a local conversation. Since it seems we are going to implement remote admins anyway going forward, I think it makes sense to have a single endpoint with everything qualified and simply return a It seems you're planning to keep making changes to this PR. Should I wait before reviewing? |
Yes, please wait. I'll implement leaving via the same endpoint and get rid of that extra event type. Once I'm done, I'll let you know. |
46ae82e
to
528b923
Compare
Create QualifiedUserIdList to be used in conversation events
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now 🚀
Note: This PR is based on Paolo's PR #1707, which fixes Swagger for responses with the same status code. Perhaps it would make sense to review and get that PR merged before this one; the difference to
develop
will reduce once that is done.The PR introduces a new endpoint that enables removing a conversation member based on their qualified user ID from a local conversation:
DELETE /conversations/:convId/members/:domain/:usr
. It can also be used for a user to leave a conversation.The PR also rewrites the unqualified existing endpoint
DELETE /conversations/:convId/members/:usr
from wai-route to Servant.All the error responses of both the qualified and unqualified endpoints have been made explicit, by expressing them via types. Now it is clear there are 7 error responses plus a no-change response, in addition to a response when an update took place. Assuming a switch to OpenAPI 3 is made, an automatic additional benefit of the rewrite for clients will be an updated Swagger documentation that enumerates all the responses (currently, due to the
servant-swagger
package, multiple responses with the same status code get collapsed into one response in Swagger; PR #1707 works around that). Furthermore, the unqualified endpoint had a Swagger that was out of sync with the actual implementation, and the rewrite addresses this issue.Checklist
make git-add-cassandra-schema
to update the cassandra schema documentation.