]> cat aescling's git repositories - mastodon.git/commitdiff
Fix #6204: Use content warning for page title when present (#6231)
authorEugen Rochko <eugen@zeonfederated.com>
Tue, 9 Jan 2018 18:34:58 +0000 (19:34 +0100)
committerGitHub <noreply@github.com>
Tue, 9 Jan 2018 18:34:58 +0000 (19:34 +0100)
app/views/stream_entries/show.html.haml

index b52334a2899f1936c9c98c3925b6a77a42d154db..cf6671e67fe618454601ce0560248d266e05a4fc 100644 (file)
@@ -1,5 +1,5 @@
 - content_for :page_title do
-  = t('statuses.title', name: display_name(@account), quote: truncate(@stream_entry.activity.text, length: 50, omission: '…'))
+  = t('statuses.title', name: display_name(@account), quote: truncate(@stream_entry.activity.spoiler_text.presence || @stream_entry.activity.text, length: 50, omission: '…'))
 
 - content_for :header_tags do
   - if @account.user&.setting_noindex