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

expose /conversations/{cnv}/members/v2 for federation backends #1543

Merged
merged 4 commits into from
Jun 1, 2021

Conversation

jschaul
Copy link
Member

@jschaul jschaul commented May 27, 2021

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.

@jschaul jschaul requested a review from pcapriotti May 27, 2021 21:35
…ds explicitly configured to allow federation
@jschaul
Copy link
Member Author

jschaul commented May 27, 2021

Dear reviewer, if you agree with this PR, please merge it.

@jschaul jschaul requested a review from akshaymankar May 31, 2021 13:25
Copy link
Contributor

@pcapriotti pcapriotti left a 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
Copy link
Contributor

@pcapriotti pcapriotti left a 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
Copy link
Contributor

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?

@jschaul jschaul merged commit 816e269 into develop Jun 1, 2021
@jschaul jschaul deleted the unhide-endpoint branch June 1, 2021 15:36
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.

2 participants