Commit d743080409ff7c683678161dc97ed77daf9096f6
1 parent
a94eb160
Exists in
master
and in
29 other branches
[spaminator] marking possible enhancements
Showing
1 changed file
with
5 additions
and
0 deletions
Show diff stats
plugins/anti_spam/lib/anti_spam_plugin/spaminator.rb
... | ... | @@ -72,6 +72,8 @@ class AntiSpamPlugin::Spaminator |
72 | 72 | # TODO several comments with the same content: |
73 | 73 | # → disable author |
74 | 74 | # → mark all of them as spam |
75 | + | |
76 | + # TODO check comments that contains URL's | |
75 | 77 | end |
76 | 78 | |
77 | 79 | def process_person(person) |
... | ... | @@ -92,6 +94,7 @@ class AntiSpamPlugin::Spaminator |
92 | 94 | # → mark their comments as spam |
93 | 95 | # |
94 | 96 | Person.where(:environment_id => @environment.id).where(['created_at < ?', Time.now - 1.month]).find_each do |person| |
97 | + # TODO progress indicator - see process_all_people above | |
95 | 98 | number_of_friends = person.friends.count |
96 | 99 | number_of_communities = person.communities.count |
97 | 100 | if number_of_friends == 0 && number_of_communities <= 1 |
... | ... | @@ -104,6 +107,8 @@ class AntiSpamPlugin::Spaminator |
104 | 107 | end |
105 | 108 | |
106 | 109 | def mark_as_spammer(person) |
110 | + # FIXME create an AbuseComplaint and finish instead of calling | |
111 | + # Person#disable directly | |
107 | 112 | person.disable |
108 | 113 | end |
109 | 114 | ... | ... |