Use diaspora_id validation from the federation gem
DRY
This commit is contained in:
parent
fedd378dcf
commit
6fba0e498e
1 changed files with 1 additions and 1 deletions
|
|
@ -185,7 +185,7 @@ class PeopleController < ApplicationController
|
|||
end
|
||||
|
||||
def diaspora_id?(query)
|
||||
!query.try(:match, /^(\w)*@([a-zA-Z0-9]|[-]|[.]|[:])*$/).nil?
|
||||
!(query.nil? || query.lstrip.empty?) && Validation::Rule::DiasporaId.new.valid_value?(query)
|
||||
end
|
||||
|
||||
# view this profile on the home pod, if you don't want to sign in...
|
||||
|
|
|
|||
Loading…
Reference in a new issue