Skip to content
Snippets Groups Projects
Commit ebfdaea3 authored by maxwell's avatar maxwell
Browse files

do not pass in the diaspora handle query as a regex, we want to search on the...

do not pass in the diaspora handle query as a regex, we want to search on the string literal.  also use dynamic finder
parent 637d35d6
No related branches found
No related tags found
No related merge requests found
......@@ -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 = /#{Regexp.escape(identifier.gsub('acct:', '').to_s)}/i
local_person = Person.first(:diaspora_handle => query)
query = Regexp.escape(identifier.gsub('acct:', '').to_s
local_person = Person.find_by_diaspora_handle(:diaspora_handle => query)
if local_person
Rails.logger.info("Do not need to webfinger, found a local person #{local_person.real_name}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment