[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
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
developwill 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/:usrfrom 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-swaggerpackage, 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-schemato update the cassandra schema documentation.