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

fix: improve invite already accepted handling #506

Merged
merged 2 commits into from
Dec 28, 2023

Conversation

swain
Copy link
Contributor

@swain swain commented Dec 26, 2023

Changes

This handling seems to have become incorrect over the past few months. This makes it correct.

Screenshots

@swain swain force-pushed the improve-invite-already-accepted-handling branch from ed30510 to d5b9fd0 Compare December 27, 2023 13:34
@swain swain requested a review from nicolls1 December 27, 2023 13:35
@swain swain marked this pull request as ready for review December 27, 2023 13:35
@coveralls
Copy link

coveralls commented Dec 27, 2023

Pull Request Test Coverage Report for Build 7350645555

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 83.879%

Totals Coverage Status
Change from base Build 7292661841: 0.003%
Covered Lines: 3231
Relevant Lines: 3742

💛 - Coveralls

}

if (typeof response !== 'object') {
return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this return a true or false?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch.

if (
'error' in response &&
typeof response.error === 'string' &&
response.error.includes('already accepted')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the API be modified to have a consistent behavior instead of two ways to return the same thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mdlavin Yes, it definitely should. I'd like to consider that change out-of-scope for this PR.

FWIW, as far as I can tell, the behavior is consistent. But, the current SDK logic is simply not correct. I'd like to get this sub-optimal extra handling in place, then follow-up with a deeper investigation to simplify the logic (client-side, server-side, or both)

@swain swain requested a review from mdlavin December 28, 2023 19:30
@swain swain merged commit e561388 into master Dec 28, 2023
3 checks passed
@swain swain deleted the improve-invite-already-accepted-handling branch December 28, 2023 19:34
Copy link

🎉 This PR is included in version 11.6.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot added the released Has been released to the package repository (NPM, etc) label Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Has been released to the package repository (NPM, etc)
Projects
None yet
3 participants