Merge branch 'master' of github.com:diaspora/diaspora_rails
This commit is contained in:
commit
0af6f7b0e5
3 changed files with 11 additions and 7 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -138,5 +138,8 @@ describe Person do
|
||||||
people.include?(@friend_two).should == false
|
people.include?(@friend_two).should == false
|
||||||
people.include?(@friend_three).should == false
|
people.include?(@friend_three).should == false
|
||||||
end
|
end
|
||||||
|
it 'should search by email exactly' do
|
||||||
|
Person.by_webfinger(@friend_one.email).should == @friend_one
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue