Skip to content

Commit

Permalink
modify spam algorithm to catch prolific spammers who check their work…
Browse files Browse the repository at this point in the history
…. (take 2)
  • Loading branch information
rneiss committed Mar 25, 2022
1 parent 93abc82 commit 8cddcb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sefaria/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ def profile_spam_dashboard(request):
{'website': {"$ne": ""}, 'bio': {"$ne": ""}, "id": {"$gt": earliest_new_user_id},
"reviewed": {"$ne": True}},
{'bio': {"$regex": regex}, "id": {"$gt": earliest_new_user_id}, "reviewed": {"$ne": True}},
{'slug': {"$regex": spam_keywords_regex}, "id": {"$gt": earliest_new_user_id}, "reviewed": {"$ne": True}, "book": {"$ne": "Sheet"}}
{'slug': {"$regex": spam_keywords_regex}, "id": {"$gt": earliest_new_user_id}, "reviewed": {"$ne": True}}
]
})

Expand All @@ -883,7 +883,7 @@ def profile_spam_dashboard(request):
profiles_list = []

for user in users_to_check:
history_count = db.user_history.find({'uid': user['id']}).count()
history_count = db.user_history.find({'uid': user['id'], 'book': {'$ne': 'Sheet'}}).count()
if history_count < 10:
profile = model.user_profile.UserProfile(id=user["id"])

Expand Down

0 comments on commit 8cddcb0

Please sign in to comment.