Requesting now searches the local server by email for a matching person.

This commit is contained in:
Raphael 2010-08-17 10:37:09 -07:00
parent e32315b6c6
commit 50919ef491
2 changed files with 8 additions and 7 deletions

View file

@ -26,12 +26,13 @@ module RequestsHelper
end end
def relationship_flow(identifier) def relationship_flow(identifier)
puts request.host action = :none
if identifier.include?(request.host) url = nil
person = Person.by_webfinger identifier local_person = Person.by_webfinger identifier
action = (person == current_user.person ? :none : :friend) if local_person
url = person.owner.receive_url action = (local_person == current_user.local_person ? :none : :friend)
else url = local_person.receive_url
elsif !(identifier.include?(request.host) || identifier.include?("localhost"))
f = Redfinger.finger(identifier) f = Redfinger.finger(identifier)
action = subscription_mode(f) action = subscription_mode(f)
url = subscription_url(action, f) url = subscription_url(action, f)

View file

@ -40,7 +40,7 @@ class Person
this.profile.first_name.match(/^#{query}/i) || this.profile.first_name.match(/^#{query}/i) ||
this.profile.last_name.match(/^#{query}/i); }") this.profile.last_name.match(/^#{query}/i); }")
end end
def real_name def real_name
"#{profile.first_name.to_s} #{profile.last_name.to_s}" "#{profile.first_name.to_s} #{profile.last_name.to_s}"
end end