reverting, going to write a test

This commit is contained in:
maxwell 2010-10-22 15:37:22 -07:00
parent f20078cc5c
commit 837b418201

View file

@ -97,8 +97,8 @@ class Person
# Raise an error if identifier is not a valid email (generous regexp)
raise "Identifier is invalid" if !(identifier =~ /\A.*\@.*\..*\Z/)
query = identifier.gsub('acct:', '').to_s
local_person = Person.find_by_diaspora_handle(:diaspora_handle => query)
query = /#{Regexp.escape(identifier.gsub('acct:', '').to_s)}/i
local_person = Person.first(:diaspora_handle => query)
if local_person
Rails.logger.info("Do not need to webfinger, found a local person #{local_person.real_name}")