don't run spam checks on gold account users (ref #3301)

This commit is contained in:
r888888888
2017-09-15 16:15:32 -07:00
parent 4c565b443e
commit 1e413362e3
2 changed files with 60 additions and 1 deletions

View File

@@ -52,7 +52,11 @@ class Dmail < ApplicationRecord
def initialize_attributes
self.from_id ||= CurrentUser.id
self.creator_ip_addr ||= CurrentUser.ip_addr
self.is_spam = spam?
if CurrentUser.is_gold?
self.is_spam = false
else
self.is_spam = spam?
end
true
end
end