mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 15:58:50 +00:00
Treat non-null but blank account domain as local (#33576)
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user