0
0
Fork 0

Put ActivityPub alternate link into Atom, prefer it when processing Atom (#4623)

This commit is contained in:
Eugen Rochko 2017-08-18 01:03:18 +02:00 committed by GitHub
parent efec02f153
commit 40c45f5dd9
6 changed files with 32 additions and 8 deletions

View file

@ -343,6 +343,8 @@ class OStatus::AtomSerializer
end
def serialize_status_attributes(entry, status)
append_element(entry, 'link', nil, rel: :alternate, type: 'application/activity+json', href: ActivityPub::TagManager.instance.uri_for(status)) if status.account.local?
append_element(entry, 'summary', status.spoiler_text, 'xml:lang': status.language) if status.spoiler_text?
append_element(entry, 'content', Formatter.instance.format(status).to_str, type: 'html', 'xml:lang': status.language)