闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
362 B

  1. module ProfileHelper
  2. def display_name(account)
  3. account.display_name.blank? ? account.username : account.display_name
  4. end
  5. def profile_url(account)
  6. account.local? ? super(name: account.username) : account.url
  7. end
  8. def status_url(status)
  9. status.local? ? super(name: status.account.username, id: status.stream_entry.id) : status.url
  10. end
  11. end