Create Object.hashtags/1 wrapper
[akkoma] / 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 @view_module, "_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_content(@data) %></content>
10
11 <%= if @activity.local do %>
12 <link type="application/atom+xml" href='<%= @data["id"] %>' rel="self"/>
13 <link type="text/html" href='<%= @data["id"] %>' rel="alternate"/>
14 <% else %>
15 <link type="text/html" href='<%= @data["external_url"] %>' rel="alternate"/>
16 <% end %>
17
18 <published><%= @activity.data["published"] %></published>
19 <updated><%= @activity.data["published"] %></updated>
20
21 <ostatus:conversation ref="<%= activity_context(@activity) %>">
22 <%= activity_context(@activity) %>
23 </ostatus:conversation>
24 <link href="<%= activity_context(@activity) %>" rel="ostatus:conversation"/>
25
26 <%= if @data["summary"] do %>
27 <summary><%= @data["summary"] %></summary>
28 <% end %>
29
30 <%= for id <- @activity.recipients do %>
31 <%= if id == Pleroma.Constants.as_public() do %>
32 <link rel="mentioned"
33 ostatus:object-type="http://activitystrea.ms/schema/1.0/collection"
34 href="http://activityschema.org/collection/public"/>
35 <% else %>
36 <%= unless Regex.match?(~r/^#{Pleroma.Web.base_url()}.+followers$/, id) do %>
37 <link rel="mentioned"
38 ostatus:object-type="http://activitystrea.ms/schema/1.0/person"
39 href="<%= id %>" />
40 <% end %>
41 <% end %>
42 <% end %>
43
44 <%= for hashtag <- Object.hashtags(@data) do %>
45 <category term="<%= hashtag %>"></category>
46 <% end %>
47
48 <%= for {emoji, file} <- @data["emoji"] || %{} do %>
49 <link name="<%= emoji %>" rel="emoji" href="<%= file %>"/>
50 <% end %>
51 </entry>