Discussion on: dev.to open source help/discussion thread (v0)

georgecoldham profile image

Hey, im trying to contribute to issue #3091

Rate limiting new posts for users #3091

Is your feature request related to a problem? Please describe. I occasionally find my feed clogged with posts that I guess are bots? Or users trying to push users off site.

Describe the solution you'd like Rate limit users posts per hour. Perhaps loosen limits for people who have old enough accounts and/or enough post interactions.

Describe alternatives you've considered Creating a bot to filter out any similarly titled articles?

Additional context Example of my latest feed: Screenshot 2019-06-10 at 13 49 14

Examples of users who have been created today and have posted 15+ posts each within the last 40 minutes: Screenshot 2019-06-10 at 13 53 46 Screenshot 2019-06-10 at 13 54 07 Screenshot 2019-06-10 at 13 54 16

Screenshot 2019-06-10 at 14 00 23 Screenshot 2019-06-10 at 14 00 35

Im new to ruby/rails & this codebase and having a couple of issues with identifying the correct place to add new features.

Where I am up to:

I have rate limiting working and it will save a users post instead of publishing it. I am trying to inform the user of this by appending a message in the front end based upon a flag on the Article. Similar to the flag used when informing the user of a saved post (eg. Article.published). but I cannot figure out how to add this parameter to the Article object.

Thanks for any help.

andy profile image
Andy Zhao (he/him) Author

Hey George, thanks for working on this. I'm not completely clear on what you mean by "appending a message in the front end based upon a flag on the Article." In my head, you mean the following:

  1. User who has already hit the rate limit hits the publish button
  2. The post is not published but instead saved
  3. User lands on the unpublished post with the red "edit" banner

I think it would make more sense to add error messaging that prevents a user from publishing, and the user will still have click "save draft" instead.

georgecoldham profile image

I had this, although it was recommended against in the pull request. Although it seems there were more issues there.