Create Object.hashtags/1 wrapper
[akkoma] / lib / pleroma / web / templates / feed / feed / _activity.rss.eex
index a4dbed6382aaeabde389221a9206c84555665665..6ef24d0ef595dee79dce09b18616a7bf1fbdde78 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>
   <guid><%= @data["id"] %></guid>
-  <title><%= activity_title(@object, Keyword.get(@feed_config, :post_title, %{})) %></title>
-  <description><%= activity_content(@object) %></description>
-  <pubDate><%= @data["published"] %></pubDate>
-  <updated><%= @data["published"] %></updated>
+  <title><%= activity_title(@data, Keyword.get(@feed_config, :post_title, %{})) %></title>
+  <description><%= activity_content(@data) %></description>
+  <pubDate><%= @activity.data["published"] %></pubDate>
+  <updated><%= @activity.data["published"] %></updated>
   <ostatus:conversation ref="<%= activity_context(@activity) %>">
     <%= activity_context(@activity) %>
   </ostatus:conversation>
   <link rel="ostatus:conversation"><%= activity_context(@activity) %></link>
 
   <%= if @data["summary"] do %>
-    <description><%= @data["summary"] %></description>
+    <description><%= escape(@data["summary"]) %></description>
   <% end %>
 
   <%= if @activity.local do %>
@@ -21,8 +21,8 @@
     <link><%= @data["external_url"] %></link>
   <% 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 %>