]> cat aescling's git repositories - mastodon.git/commitdiff
Fix #1852 - Ensure feeds have valid <title> tags (#1875)
authorEugen <eugen@zeonfederated.com>
Sun, 16 Apr 2017 00:40:36 +0000 (02:40 +0200)
committerGitHub <noreply@github.com>
Sun, 16 Apr 2017 00:40:36 +0000 (02:40 +0200)
app/lib/atom_serializer.rb

index 69e1f153c3727b7a692bba873abc13157942ea38..180b9bb825fe87fc55505fd2be72a09368a615dd 100644 (file)
@@ -39,7 +39,7 @@ class AtomSerializer
     add_namespaces(feed)
 
     append_element(feed, 'id', account_url(account, format: 'atom'))
-    append_element(feed, 'title', account.display_name)
+    append_element(feed, 'title', account.display_name.presence || account.username)
     append_element(feed, 'subtitle', account.note)
     append_element(feed, 'updated', account.updated_at.iso8601)
     append_element(feed, 'logo', full_asset_url(account.avatar.url(:original)))