]> git.openstreetmap.org Git - rails.git/commitdiff
Reduce the effect of the user description on the spam score
authorTom Hughes <tom@compton.nu>
Wed, 15 Feb 2012 16:24:43 +0000 (16:24 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 15 Feb 2012 16:24:43 +0000 (16:24 +0000)
app/models/user.rb

index cf506e7c9e7192860d0c75ccea5e746ce7894b2f..cc538966348dca7936dcd66061f860dda0d6b10a 100644 (file)
@@ -198,7 +198,7 @@ class User < ActiveRecord::Base
     diary_entry_score = self.diary_entries.inject(0) { |s,e| s += OSM.spam_score(e.body) }
     diary_comment_score = self.diary_comments.inject(0) { |s,e| s += OSM.spam_score(e.body) }
 
-    score = OSM.spam_score(self.description) * 2
+    score = OSM.spam_score(self.description)
     score += diary_entry_score / self.diary_entries.length if self.diary_entries.length > 0
     score += diary_comment_score / self.diary_comments.length if self.diary_comments.length > 0
     score -= changeset_score