exchange photos on adding new friend
This commit is contained in:
parent
7a1811807c
commit
85b384010e
2 changed files with 8 additions and 2 deletions
|
|
@ -110,7 +110,7 @@ class Person
|
|||
hcard = HCard.find profile.hcard.first[:href]
|
||||
|
||||
new_person.url = hcard[:url]
|
||||
new_person.profile = Profile.new(:first_name => hcard[:given_name], :last_name => hcard[:family_name])
|
||||
new_person.profile = Profile.new(:first_name => hcard[:given_name], :last_name => hcard[:family_name], :image_url => hcard[:photo])
|
||||
if new_person.save
|
||||
new_person
|
||||
else
|
||||
|
|
|
|||
|
|
@ -33,9 +33,15 @@
|
|||
<a href="<%= @person.url%>" rel="me" id="pod_location" class="url"><%= @person.url%></a>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="entity_photo">
|
||||
<dt>Photo</dt>
|
||||
<dd>
|
||||
<span class="photo"><%= @person.profile.image_url%></span>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="entity_note">
|
||||
<dt>Note</dt>
|
||||
<dd class="note">Diaspora is awesome! vi is better than emacs!</dd>
|
||||
<dd class="note">Diaspora is awesome! Emacs is better than vi!</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue