Skip to content
Extraits de code Groupes Projets
Valider 522450c9 rédigé par Raphael's avatar Raphael
Parcourir les fichiers

RS IZ added a logger statement and a guid in the webfinger profile

parent 86d9a41d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -94,12 +94,14 @@ class Person
public_key = profile.links.select{|x| x.rel == 'diaspora-public-key'}.first.href
new_person.exported_key = Base64.decode64 public_key
guid = profile.links.select{|x| x.rel == 'diaspora-public-key'}.first.href
new_person.id = guid
new_person.email = identifier
hcard = HCard.find profile.hcard.first[:href]
receive_url = profile.links.select{ |l| l.rel == 'http://joindiaspora.com/seed_location'}.first.href
new_person.url = hcard[:url]
new_person.profile = Profile.new(:first_name => hcard[:given_name], :last_name => hcard[:family_name])
if new_person.save
......
......@@ -204,6 +204,7 @@ class User
###### Receiving #######
def receive_salmon xml
Rails.logger.info("Received a salmon: #{xml}")
salmon = Salmon::SalmonSlap.parse xml
if salmon.verified_for_key?(salmon.author.public_key)
self.receive(decrypt(salmon.data))
......
......@@ -4,6 +4,7 @@
<Alias>"<%= @person.url %>"</Alias>
<Link rel="http://microformats.org/profile/hcard" type="text/html" href="<%=@person.url%>/hcard/users/<%=@person.id%>"/>
<Link rel="http://schemas.google.com/g/2010#updates-from" type="application/atom+xml" href="<%=@person.url%>status_messages.atom"/>
<Link rel="http://joindiaspora.com/seed_location" type = 'text/html' href="<%=@person.receive_url%>"/>
<Link rel="http://joindiaspora.com/seed_location" type = 'text/html' href="<%=@person.url%>"/>
<Link rel="http://joindiaspora.com/guid" type = 'text/html' href="<%=@person.id%>"/>
<Link rel="diaspora-public-key" type = 'RSA' href="<%=Base64.encode64(@person.exported_key)%>"/>
</XRD>
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter