03c222975ec756c28fbdc35578402ddd0976fbab
[anni] / lib / pleroma / web / templates / feed / feed / _tag_activity.atom.eex
1 <entry>
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
5     <%= render Phoenix.Controller.view_module(@conn), "_tag_author.atom", assigns %>
6
7   <id><%= @data["id"] %></id>
8   <title><%= activity_title(@data, Keyword.get(@feed_config, :post_title, %{})) %></title>
9   <content type="html"><%= activity_description(@data) %></content>
10   <published><%= to_rfc3339(@data["published"]) %></published>
11   <updated><%= to_rfc3339(@data["published"]) %></updated>
12   <ostatus:conversation ref="<%= activity_context(@activity) %>">
13     <%= activity_context(@activity) %>
14   </ostatus:conversation>
15   <link href="<%= activity_context(@activity) %>" rel="ostatus:conversation"/>
16
17   <%= if @data["summary"] != "" do %>
18     <summary><%= @data["summary"] %></summary>
19   <% end %>
20
21   <%= if @activity.local do %>
22     <link type="application/atom+xml" href='<%= @data["id"] %>' rel="self"/>
23     <link type="text/html" href='<%= @data["id"] %>' rel="alternate"/>
24   <% else %>
25     <link type="text/html" href='<%= @data["external_url"] %>' rel="alternate"/>
26   <% end %>
27
28   <%= for id <- @activity.recipients do %>
29     <%= if id == Pleroma.Constants.as_public() do %>
30       <link rel="mentioned"
31             ostatus:object-type="http://activitystrea.ms/schema/1.0/collection"
32             href="http://activityschema.org/collection/public"/>
33     <% else %>
34       <%= unless Regex.match?(~r/^#{Pleroma.Web.Endpoint.url()}.+followers$/, id) do %>
35         <link rel="mentioned"
36               ostatus:object-type="http://activitystrea.ms/schema/1.0/person"
37               href="<%= id %>" />
38       <% end %>
39     <% end %>
40   <% end %>
41
42   <%= for tag <- Pleroma.Object.hashtags(@object) do %>
43     <category term="<%= tag %>"></category>
44   <% end %>
45
46   <%= for {emoji, file} <- @data["emoji"] || %{} do %>
47     <link name="<%= emoji %>" rel="emoji" href="<%= file %>"/>
48   <% end %>
49 </entry>