pleroma/lib/pleroma/web/templates/feed/feed/_tag_author.atom.eex
faried nawaz 3f0783c0a5
fix atom and rss feeds for users and tags
Changes:
  - make the XML closer to spec (RSS does not pass w3c's validator, but works)
  - fix dates (RFC3339 for Atom, doc says RFC822 for RSS but RFC1123 is closer)
  - fix attachment/enclosure links (but see below)
  - set feed item title to post's "summary" if present
  - pruned several elements that validators did not like
    - examples: ap_enabled, user banner urls.

Specs:
  - https://www.rssboard.org/rss-specification
  - https://validator.w3.org/feed/docs/atom.html
  - https://www.intertwingly.net/wiki/pie/Rss20AndAtom10Compared

Validators:
  - https://validator.w3.org/feed/
  - https://rssatom.com/feedvalidator.php

Attachment/enclosure links should have a "length" field (mandatory
according to the spec).  This is not present in the object's data
map.
2022-12-19 01:44:41 +05:00

15 lines
751 B
Elixir

<author>
<uri><%= @actor.ap_id %></uri>
<name><%= @actor.nickname %></name>
<activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
<activity:displayName><%= @actor.name %></activity:displayName>
<activity:image><%= User.avatar_url(@actor) %></activity:image>
<activity:id><%= @actor.ap_id %></activity:id>
<activity:published><%= to_rfc3339(@actor.inserted_at) %></activity:published>
<activity:updated><%= to_rfc3339(@actor.updated_at) %></activity:updated>
<activity:url><%= @actor.ap_id %></activity:url>
<poco:preferredUsername><%= @actor.nickname %></poco:preferredUsername>
<poco:displayName><%= @actor.name %></poco:displayName>
<poco:note><%= escape(@actor.bio) %></poco:note>
</author>