-
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
Add remote members to conversations #1529
Conversation
It used to be specific to brig, but not it is used by galley as well.
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.
I suppose an end2end test would be nice to catch possible misconfigurations here now that real RPCs are made from/to galley. (in this or a follow-up PR)
You can also remove point (1) from that futurework comment now 😸
[mkProfile remoteCharlie (Name "charlie")] | ||
(postQualifiedMembers' g alice (remoteBob :| []) convId) |
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.
Do I read this code correctly as "dear Mock Federator, please give back a profile for Charlie when asking for the userId of bob" ? If so, this is an interesting test case that is good to cover but implausible to happen in well-behaved backends. Could you also extend this test to include the (likely more common) case of the domain being correct but that user not existing (should give 404 in the client-server API, not sure what the RPC will give) or that user having been deleted (deleted flag in the profile being set to true)?
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 think what I meant to do here is add both Bob and Charlie to the conversation, where the remote only knows about Charlie. But I forgot to include Charlie in the request.
I will add the other tests you suggested, though, they do sound like good scenarios to check.
Test scenario where both Bob and Charlie are added to a conversation, but only Charlie exists on the remote backend.
3004acf
to
d0d9ad3
Compare
Also add corresponding test
Mark first point of the TODO list as DONE, but leave it there for future reference.
Some preliminary work to make the endpoint for adding remote users to conversations functional. This implements point (1) in the comment of
addMembers
, i.e. it checks if remote users exist before adding them to a conversation. If some remote users do not exist, a new error with status code 400 is returned.I also added some tests using the mock federator exposed by #1524.
The rest of the functionality required by
addMembers
will be implemented in follow-up PRs.TODO
add end2end test(Moved to Add end2end test for adding remote users to a conversation #1538)