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

Improvement on numbers validation #377

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

judsonjuniorr
Copy link
Contributor

This changes the method of number validations, to group it and use the levenshtein comparison to check for minimal changes of jids (use of the 9 digit in BR).

Some tests were made using 432 numbers.

With the current code it took around 88s
image

And with the new code it took around 445ms
image

I've checked the result of both requests and compared the JSON of it
image

This is to prevent returning another jid when only one digit is different and not the 9 digit
@DavidsonGomes DavidsonGomes merged commit 56dfc2a into EvolutionAPI:develop Jan 29, 2024
@judsonjuniorr judsonjuniorr deleted the validate-numbers branch January 29, 2024 14:32
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