IZ MS added diaspora rel to webfinger profile

This commit is contained in:
maxwell 2010-07-16 21:33:08 -07:00
parent b3bb9f8da2
commit 36c911d20b
3 changed files with 15 additions and 1 deletions

View file

@ -22,7 +22,7 @@ gem 'addressable', :require => "addressable/uri"
gem 'em-websocket' gem 'em-websocket'
gem 'thin' gem 'thin'
gem 'will_paginate', '3.0.pre' gem 'will_paginate', '3.0.pre'
gem 'redfinger'
group :test do group :test do
gem 'rspec', '>= 2.0.0.beta.17' gem 'rspec', '>= 2.0.0.beta.17'

View file

@ -25,6 +25,7 @@ class RequestsController < ApplicationController
end end
def create def create
url = find_url(params)
@request = current_user.send_friend_request_to(params[:request][:destination_url]) @request = current_user.send_friend_request_to(params[:request][:destination_url])
if @request if @request
flash[:notice] = "a friend request was sent to #{@request.destination_url}" flash[:notice] = "a friend request was sent to #{@request.destination_url}"
@ -37,5 +38,17 @@ class RequestsController < ApplicationController
end end
end end
private
def diasproa_url(url)
if url.include? '@'
f = Redfinger.finger(uri)
end
uri
end
end end

View file

@ -4,4 +4,5 @@
<Alias>"<%=@user.url%>hcard"</Alias> <Alias>"<%=@user.url%>hcard"</Alias>
<Link rel="http://microformats.org/profile/hcard" type="text/html" href="<%=@user.url%>hcard"/> <Link rel="http://microformats.org/profile/hcard" type="text/html" href="<%=@user.url%>hcard"/>
<Link rel="http://schemas.google.com/g/2010#updates-from" type="application/atom+xml" href="<%=@user.url%>status_messages.atom"/> <Link rel="http://schemas.google.com/g/2010#updates-from" type="application/atom+xml" href="<%=@user.url%>status_messages.atom"/>
<Link rel="http://joindiaspora.com/location" type = 'text/html' href="<%=@user.url%>
</XRD> </XRD>