Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.9KB

  1. <item>
  2. <activity:object-type>http://activitystrea.ms/schema/1.0/note</activity:object-type>
  3. <activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
  4. <guid><%= @data["id"] %></guid>
  5. <title><%= activity_title(@data, Keyword.get(@feed_config, :post_title, %{})) %></title>
  6. <description><%= activity_content(@data) %></description>
  7. <pubDate><%= @activity.data["published"] %></pubDate>
  8. <updated><%= @activity.data["published"] %></updated>
  9. <ostatus:conversation ref="<%= activity_context(@activity) %>">
  10. <%= activity_context(@activity) %>
  11. </ostatus:conversation>
  12. <%= if @data["summary"] do %>
  13. <description><%= escape(@data["summary"]) %></description>
  14. <% end %>
  15. <%= if @activity.local do %>
  16. <link><%= @data["id"] %></link>
  17. <% else %>
  18. <link><%= @data["external_url"] %></link>
  19. <% end %>
  20. <link rel="ostatus:conversation"><%= activity_context(@activity) %></link>
  21. <%= for tag <- @data["tag"] || [] do %>
  22. <category term="<%= tag %>"></category>
  23. <% end %>
  24. <%= for attachment <- @data["attachment"] || [] do %>
  25. <link type="<%= attachment_type(attachment) %>"><%= attachment_href(attachment) %></link>
  26. <% end %>
  27. <%= if @data["inReplyTo"] do %>
  28. <thr:in-reply-to ref='<%= @data["inReplyTo"] %>' href='<%= get_href(@data["inReplyTo"]) %>'/>
  29. <% end %>
  30. <%= for id <- @activity.recipients do %>
  31. <%= if id == Pleroma.Constants.as_public() do %>
  32. <link rel="mentioned" ostatus:object-type="http://activitystrea.ms/schema/1.0/collection">http://activityschema.org/collection/public</link>
  33. <% else %>
  34. <%= unless Regex.match?(~r/^#{Pleroma.Web.Endpoint.url()}.+followers$/, id) do %>
  35. <link rel="mentioned" ostatus:object-type="http://activitystrea.ms/schema/1.0/person"><%= id %></link>
  36. <% end %>
  37. <% end %>
  38. <% end %>
  39. <%= for {emoji, file} <- @data["emoji"] || %{} do %>
  40. <link name="<%= emoji %>" rel="emoji"><%= file %></link>
  41. <% end %>
  42. </item>