-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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: Client.acceptInvite
#2642
base: main
Are you sure you want to change the base?
fix: Client.acceptInvite
#2642
Conversation
If the result object used to return |
I changed to |
It's still will break the current behavior |
Yes, the pr has break changes |
So let keep it less breaking... |
f9b7e0e
to
a8ffa8d
Compare
No problem, renamed |
Important
breaking changeFix or feature that would cause existing functionality to change
Table of Contents
- Description
- Related Issue
- Usage Example
- I Want to Test this PR
- I Got an Error While Testing This PR ❌
- How Has the PR Been Tested (latest test on 01.12.2023)
- Types of Changes
Description
The
Client.acceptInvite
method previously encountered an error when attempting to accept an invitation link for a group with Membership Approval Mode turned on.The PR fixes that issue, and also improves user convenience by merging
Client.acceptGroupV4Invite
intoClient.acceptInvite
, now you can achieve the same result using a single method.Furthermore, the
Client.acceptInvite
method's return value now provides additional information, including error codes and their explanations, to help better understand any issues that may occur during the method's execution.For not to break a lot the
Client.acceptGroupV4Invite
method hasn't been removed, all the underlying logic has been migrated to theClient.acceptInvite
.❗ Breaking Change:
The
Client.acceptInvite
,Client.acceptGroupV4Invite
andMessage.acceptGroupV4Invite
methods now return an object with the following structure:Related Issue
The PR closes #2256
Usage Example
To test this PR by yourself you can run one of the following commands:
If you encounter any errors while testing this PR, please provide in a comment:
console.log(await client.getWWebVersion());
Important
You have to reapply the PR each time it is changed (new commits were pushed since your last application)
How Has The PR Been Tested (latest test on 01.12.2023)
Tested with a code provided in usage exmaple on groups that have the membership approval mode turned on and off.
Tested On:
Types of accounts:
Environment:
Types of Changes
Checklist