From: Tom Hughes Date: Wed, 15 Feb 2012 16:24:43 +0000 (+0000) Subject: Reduce the effect of the user description on the spam score X-Git-Tag: live~6814 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/52be0e81a0d8fb30a635b32f85d4465fc0578067?ds=sidebyside Reduce the effect of the user description on the spam score --- diff --git a/app/models/user.rb b/app/models/user.rb index cf506e7c9..cc5389663 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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