mifi / instauto

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

followUserFollowers isn't checking limits #56

Closed cosme12 closed 3 years ago

cosme12 commented 3 years ago

Opened issue for #55

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.