about summary refs log tree commit diff
path: root/app/models/account.rb
diff options
context:
space:
mode:
authorysksn <bluewhale1982@gmail.com>2018-12-26 14:38:42 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-12-26 06:38:42 +0100
commit0c1e4bb969a117c186e08396f9db0f747f04bdbd (patch)
tree0a006b6b39dcae71a50366125d4d1eb26099bbcb /app/models/account.rb
parentbf70e5cfdaef9b7a3a927548a05203a864d5bea9 (diff)
Create DomainNormalizable#normalize_domain (#9631)
Diffstat (limited to 'app/models/account.rb')
-rw-r--r--app/models/account.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 16ef6c187..cf804fc67 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -59,6 +59,7 @@ class Account < ApplicationRecord
   include Attachmentable
   include Paginable
   include AccountCounters
+  include DomainNormalizable
 
   enum protocol: [:ostatus, :activitypub]
 
@@ -457,7 +458,6 @@ class Account < ApplicationRecord
   end
 
   before_create :generate_keys
-  before_validation :normalize_domain
   before_validation :prepare_contents, if: :local?
   before_destroy :clean_feed_manager
 
@@ -479,7 +479,7 @@ class Account < ApplicationRecord
   def normalize_domain
     return if local?
 
-    self.domain = TagManager.instance.normalize_domain(domain)
+    super
   end
 
   def emojifiable_text