]> cat aescling's git repositories - mastodon.git/commitdiff
Fix double-encoding of display name in title and e-mails (#7534)
authorEugen Rochko <eugen@zeonfederated.com>
Fri, 18 May 2018 13:56:57 +0000 (15:56 +0200)
committerGitHub <noreply@github.com>
Fri, 18 May 2018 13:56:57 +0000 (15:56 +0200)
app/helpers/stream_entries_helper.rb

index 707c8e26ce9411f6d08591ac72e24e96eae63043..a91a2893556834024faf70c9c347c8af7612e194 100644 (file)
@@ -5,7 +5,11 @@ module StreamEntriesHelper
   EMBEDDED_ACTION = 'embed'
 
   def display_name(account, **options)
-    Formatter.instance.format_display_name(account, options)
+    if options[:custom_emojify]
+      Formatter.instance.format_display_name(account, options)
+    else
+      account.display_name.presence || account.username
+    end
   end
 
   def account_description(account)