]> cat aescling's git repositories - mastodon.git/commitdiff
Fix #1339 - better Atom titles (#1343)
authorEugen <eugen@zeonfederated.com>
Sun, 9 Apr 2017 18:55:54 +0000 (20:55 +0200)
committerGitHub <noreply@github.com>
Sun, 9 Apr 2017 18:55:54 +0000 (20:55 +0200)
app/lib/atom_serializer.rb
app/models/status.rb

index b9dcee6b32d8c04094620b365338fa7d4abbf46c..845d38c925427218f207e53076e58c30152fb305 100644 (file)
@@ -67,7 +67,7 @@ class AtomSerializer
     append_element(entry, 'id', TagManager.instance.unique_tag(stream_entry.created_at, stream_entry.activity_id, stream_entry.activity_type))
     append_element(entry, 'published', stream_entry.created_at.iso8601)
     append_element(entry, 'updated', stream_entry.updated_at.iso8601)
-    append_element(entry, 'title', stream_entry&.status&.title)
+    append_element(entry, 'title', stream_entry&.status&.title || 'Delete')
 
     entry << author(stream_entry.account) if root
 
index 7e3dd3e28829e8372cf6668b8ee023f55f5dc3c6..16cd4383f15d33f3c3a0a9a252b44ca048704c87 100644 (file)
@@ -75,7 +75,7 @@ class Status < ApplicationRecord
   end
 
   def title
-    content
+    reblog? ? "#{account.acct} shared a status by #{reblog.account.acct}" : "New status by #{account.acct}"
   end
 
   def hidden?