From d743080409ff7c683678161dc97ed77daf9096f6 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Mon, 10 Sep 2012 17:33:13 -0300 Subject: [PATCH] [spaminator] marking possible enhancements --- plugins/anti_spam/lib/anti_spam_plugin/spaminator.rb | 5 +++++ 1 file changed, 5 insertions(+), 0 deletions(-) diff --git a/plugins/anti_spam/lib/anti_spam_plugin/spaminator.rb b/plugins/anti_spam/lib/anti_spam_plugin/spaminator.rb index f182903..490f370 100644 --- a/plugins/anti_spam/lib/anti_spam_plugin/spaminator.rb +++ b/plugins/anti_spam/lib/anti_spam_plugin/spaminator.rb @@ -72,6 +72,8 @@ class AntiSpamPlugin::Spaminator # TODO several comments with the same content: # → disable author # → mark all of them as spam + + # TODO check comments that contains URL's end def process_person(person) @@ -92,6 +94,7 @@ class AntiSpamPlugin::Spaminator # → mark their comments as spam # Person.where(:environment_id => @environment.id).where(['created_at < ?', Time.now - 1.month]).find_each do |person| + # TODO progress indicator - see process_all_people above number_of_friends = person.friends.count number_of_communities = person.communities.count if number_of_friends == 0 && number_of_communities <= 1 @@ -104,6 +107,8 @@ class AntiSpamPlugin::Spaminator end def mark_as_spammer(person) + # FIXME create an AbuseComplaint and finish instead of calling + # Person#disable directly person.disable end -- libgit2 0.21.2