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 bug where followUserFollowers wasn't checking limits #55

Merged
merged 1 commit into from
Jun 18, 2021
Merged

Fix bug where followUserFollowers wasn't checking limits #55

merged 1 commit into from
Jun 18, 2021

Conversation

cosme12
Copy link
Contributor

@cosme12 cosme12 commented Apr 18, 2021

Hello, I was using this library and I think I found a small bug: maxFollowsPerHour and maxFollowsPerDay where not being checked.

After digging a little I discovered that the function throttle() was being called only at the begging of the function followUserFollowers() L477. But if you look a little further there is a for L504 where the "user following thing" is done. So I added another call to throttle() at the end of the loop where the condition calls followCurrentUser(follower). That way the max limits are checked every time after a new user is followed.
Hope I was clear.

@mifi
Copy link
Owner

mifi commented Jun 18, 2021

Great! Thanks

@mifi mifi merged commit c5b0fff into mifi:master Jun 18, 2021
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