-
Notifications
You must be signed in to change notification settings - Fork 324
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
expose /conversations/{cnv}/members/v2 for federation backends #1543
Conversation
…ds explicitly configured to allow federation
Dear reviewer, if you agree with this PR, please merge it. |
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.
I don't understand what the point of this change is. Why should we conflate the two errors "federation-not-enabled" and "federation-not-available"? Is there any reason why we can't fix the staging/production environment by either disabling the federator endpoint completely, or by deploying a federator?
… comments to keep three booleans in sync as we have not better way here right now
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. Minor nitpick follows.
const 500 === statusCode | ||
-- FUTUREWORK: this should be a federation-not-available | ||
-- but the error is hidden inside a server-error, confusingly. | ||
-- separate task see cryptpad |
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.
Maybe not refer to internal documents in public facing code?
For (test, non-production) backends explicitly configured to use federation, expose /conversations/{cnv}/members/v2 to clients. Note that the implementation of using this endpoint isn't complete yet, but it can nonetheless be tried out by clients.
This PR adds tests to ensure this endpoint cannot be called with remote users on environments that do not support federation.