1
0
mirror of https://github.com/mastodon/mastodon synced 2024-11-24 23:26:22 +09:00
mastodon/app/helpers/profile_helper.rb

14 lines
362 B
Ruby
Raw Normal View History

2016-02-23 00:00:20 +09:00
module ProfileHelper
def display_name(account)
account.display_name.blank? ? account.username : account.display_name
end
def profile_url(account)
account.local? ? super(name: account.username) : account.url
end
def status_url(status)
status.local? ? super(name: status.account.username, id: status.stream_entry.id) : status.url
end
2016-02-23 00:00:20 +09:00
end