Create Object.hashtags/1 wrapper
[akkoma] / lib / pleroma / web / templates / feed / feed / _activity.atom.eex
index ac8a75009de834a7e97d422c1a9002121879b39a..cb18abb5db9958658ec1d8f7e232480545a72ee9 100644 (file)
@@ -2,17 +2,17 @@
   <activity:object-type>http://activitystrea.ms/schema/1.0/note</activity:object-type>
   <activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
   <id><%= @data["id"] %></id>
-  <title><%= activity_title(@object, Keyword.get(@feed_config, :post_title, %{})) %></title>
-  <content type="html"><%= activity_content(@object) %></content>
-  <published><%= @data["published"] %></published>
-  <updated><%= @data["published"] %></updated>
+  <title><%= activity_title(@data, Keyword.get(@feed_config, :post_title, %{})) %></title>
+  <content type="html"><%= activity_content(@data) %></content>
+  <published><%= @activity.data["published"] %></published>
+  <updated><%= @activity.data["published"] %></updated>
   <ostatus:conversation ref="<%= activity_context(@activity) %>">
     <%= activity_context(@activity) %>
   </ostatus:conversation>
   <link href="<%= activity_context(@activity) %>" rel="ostatus:conversation"/>
 
   <%= if @data["summary"] do %>
-    <summary><%= @data["summary"] %></summary>
+    <summary><%= escape(@data["summary"]) %></summary>
   <% end %>
 
   <%= if @activity.local do %>
@@ -22,8 +22,8 @@
     <link type="text/html" href='<%= @data["external_url"] %>' rel="alternate"/>
   <% end %>
 
-  <%= for tag <- @data["tag"] || [] do %>
-    <category term="<%= tag %>"></category>
+  <%= for hashtag <- Object.hashtags(@data) do %>
+    <category term="<%= hashtag %>"></category>
   <% end %>
 
   <%= for attachment <- @data["attachment"] || [] do %>