Create Object.hashtags/1 wrapper
[akkoma] / lib / pleroma / web / templates / feed / feed / _activity.rss.eex
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 <link rel="ostatus:conversation"><%= activity_context(@activity) %></link>
13
14 <%= if @data["summary"] do %>
15 <description><%= escape(@data["summary"]) %></description>
16 <% end %>
17
18 <%= if @activity.local do %>
19 <link><%= @data["id"] %></link>
20 <% else %>
21 <link><%= @data["external_url"] %></link>
22 <% end %>
23
24 <%= for hashtag <- Object.hashtags(@data) do %>
25 <category term="<%= hashtag %>"></category>
26 <% end %>
27
28 <%= for attachment <- @data["attachment"] || [] do %>
29 <link type="<%= attachment_type(attachment) %>"><%= attachment_href(attachment) %></link>
30 <% end %>
31
32 <%= if @data["inReplyTo"] do %>
33 <thr:in-reply-to ref='<%= @data["inReplyTo"] %>' href='<%= get_href(@data["inReplyTo"]) %>'/>
34 <% end %>
35
36 <%= for id <- @activity.recipients do %>
37 <%= if id == Pleroma.Constants.as_public() do %>
38 <link rel="mentioned" ostatus:object-type="http://activitystrea.ms/schema/1.0/collection">http://activityschema.org/collection/public</link>
39 <% else %>
40 <%= unless Regex.match?(~r/^#{Pleroma.Web.base_url()}.+followers$/, id) do %>
41 <link rel="mentioned" ostatus:object-type="http://activitystrea.ms/schema/1.0/person"><%= id %></link>
42 <% end %>
43 <% end %>
44 <% end %>
45
46 <%= for {emoji, file} <- @data["emoji"] || %{} do %>
47 <link name="<%= emoji %>" rel="emoji"><%= file %></link>
48 <% end %>
49 </item>