-
Notifications
You must be signed in to change notification settings - Fork 844
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
user: add method is_heavy_self_promoter? #427
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for doing this, it's great to have.
I've been thinking about where to apply this. Definitely in the moderator view of the user profile.
On the user-facing side, I think as a flash[:notice]
on the story submission form. If that doesn't solve the problem it can become a hard error on story submission in the future.
app/models/user.rb
Outdated
if total_count < MIN_STORIES_CHECK_SELF_PROMOTION | ||
false | ||
else | ||
authored = Story.where( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rails allows you to add to an association scope, so this could be self.stories.where(:user_is_author => true).count
.
@pushcx Okay I added something to the user profile visible to moderators. Ready for another review. For now I actually don't think anything should be user-facing, and I'm against doing a hard error on story submission. We would not want to discourage users from posting original content that is high quality and fits in with Lobsters. IMO having this visible to moderators just adds one more tool to figuring out if a user is submitting content that doesn't belong at Lobsters. Moderators can message them if their behavior is a problem. |
Good points. We can definitely take this one very slowly, as the topic generally only comes up infrequently when someone starts posting stories that attract spam flags and critical comments. |
user: add method is_heavy_self_promoter?
Per discussion https://lobste.rs/s/2somjr/5_ways_developers_waste_more_than_20_their#c_odxdsb and on IRC.
Future work (future PRs) could include checking domain names.