mifi / instauto

Instagram bot / automation library written in Javascript for Node.js
808 stars 145 forks source link

Fix bug where followUserFollowers wasn't checking limits #55

Closed cosme12 closed 3 years ago

cosme12 commented 3 years ago

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 commented 3 years ago

Great! Thanks