mirror of
https://github.com/kikobar/mastodon.git
synced 2024-11-18 13:17:35 +00:00
14 lines
362 B
Ruby
14 lines
362 B
Ruby
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
|
|
end
|