exchange photos on adding new friend

This commit is contained in:
kook 2010-09-30 06:23:11 +02:00 committed by Raphael
parent 7a1811807c
commit 85b384010e
2 changed files with 8 additions and 2 deletions

View file

@ -110,7 +110,7 @@ class Person
hcard = HCard.find profile.hcard.first[:href] hcard = HCard.find profile.hcard.first[:href]
new_person.url = hcard[:url] 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 if new_person.save
new_person new_person
else else

View file

@ -33,9 +33,15 @@
<a href="<%= @person.url%>" rel="me" id="pod_location" class="url"><%= @person.url%></a> <a href="<%= @person.url%>" rel="me" id="pod_location" class="url"><%= @person.url%></a>
</dd> </dd>
</dl> </dl>
<dl class="entity_photo">
<dt>Photo</dt>
<dd>
<span class="photo"><%= @person.profile.image_url%></span>
</dd>
</dl>
<dl class="entity_note"> <dl class="entity_note">
<dt>Note</dt> <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> </dl>
</div> </div>
</div> </div>