diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 89df261556cb6780f131bec08d2ba8e6f1810e43..b6e4c43897f002067c74985c759ce860cd0d4a73 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -57,7 +57,11 @@ module ApplicationHelper end def person_image_link(person) - link_to person_image_tag(person), object_path(person) + if current_user.friends.include?(person) || current_user.person == person + link_to person_image_tag(person), object_path(person) + else + person_image_tag person + end end def new_request(request_count) diff --git a/app/views/people/_person.html.haml b/app/views/people/_person.html.haml index 7e22a5570b274f5534d48ed2d5b2543db2b45067..185695db1a1b3347179d2941f492a4274d0fcd6a 100644 --- a/app/views/people/_person.html.haml +++ b/app/views/people/_person.html.haml @@ -8,7 +8,10 @@ .content %span.from - = link_to person.real_name, person_path(person) + - if current_user.friends.include?(person) || person.id == current_user.person.id + = link_to person.real_name, person_path(person) + - else + = person.real_name .info = person.diaspora_handle