From c1729197458588a25e8f884db22360780e43d5c7 Mon Sep 17 00:00:00 2001 From: Eugen Date: Sun, 9 Apr 2017 20:55:54 +0200 Subject: [PATCH] Fix #1339 - better Atom titles (#1343) --- app/lib/atom_serializer.rb | 2 +- app/models/status.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/lib/atom_serializer.rb b/app/lib/atom_serializer.rb index b9dcee6b32..845d38c925 100644 --- a/app/lib/atom_serializer.rb +++ b/app/lib/atom_serializer.rb @@ -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 diff --git a/app/models/status.rb b/app/models/status.rb index 7e3dd3e288..16cd4383f1 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -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?