Treat non-null but blank account domain as local (#33576)
This commit is contained in:
parent
e1d7efadc0
commit
68c9f91ccb
3 changed files with 14 additions and 14 deletions
|
@ -126,6 +126,8 @@ class Account < ApplicationRecord
|
|||
validates :uri, absence: true
|
||||
end
|
||||
|
||||
validates :domain, exclusion: { in: [''] }
|
||||
|
||||
normalizes :username, with: ->(username) { username.squish }
|
||||
|
||||
scope :without_internal, -> { where(id: 1...) }
|
||||
|
@ -187,7 +189,7 @@ class Account < ApplicationRecord
|
|||
end
|
||||
|
||||
def remote?
|
||||
domain.present?
|
||||
!domain.nil?
|
||||
end
|
||||
|
||||
def moved?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue