-
Notifications
You must be signed in to change notification settings - Fork 1
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
chore: invite API's membership check can be synchronous #480
Conversation
This change should have no user impact. This function doesn't do anything async so we can make it synchronous. I think this is a useful change on its own but will make upcoming changes a bit simpler.
There is one thing missing from the existing implementation that is asynchronous: project membership also has a "joining" state, eg a user has accepted an invite but has not finished adding the project, eg if they do not receive back the project join details, or the add project method fails for some reason. Ideally other invites would await the joining state rather than treat it as an "already joined" state. I think it's ok to ignore that state for now, but making this asynchronous just leaves more work when we try to add it back. I'm ok with that as long as we don't get ourselves into a corner where we make it really hard to deal with this edge case in the future. |
Good point. I'll make sure to do that in my upcoming work (#447). In any case, I still think it makes sense for this to be synchronous because I don't think the "joining" state would be stored here. |
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.
Great, looks good.
This change should have no user impact.
This function doesn't do anything async so we can make it synchronous. I think this is a useful change on its own but will make upcoming changes (#447) a bit simpler.