]> cat aescling's git repositories - mastodon.git/commitdiff
Use account.username when display_name is empty (#5828)
authorYamagishi Kazutoshi <ykzts@desire.sh>
Mon, 27 Nov 2017 15:09:52 +0000 (00:09 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 27 Nov 2017 15:09:52 +0000 (16:09 +0100)
app/views/stream_entries/show.html.haml

index 786a4c0a82160ca673cbe618deefe718552e4c78..895a612470b4359df9c6b15ab4c2d41e9814881e 100644 (file)
@@ -8,7 +8,7 @@
 
   = opengraph 'og:site_name', site_title
   = opengraph 'og:type', 'article'
-  = opengraph 'og:title', "#{@account.display_name} on #{site_hostname}"
+  = opengraph 'og:title', "#{@account.display_name.presence || @account.username} on #{site_hostname}"
   = opengraph 'og:url', account_stream_entry_url(@account, @stream_entry)
 
   = render 'stream_entries/og_description', activity: @stream_entry.activity