diff app/views/tweets/_tweet.atom.erb @ 234:7a773720d81f legit-client

Totally legit client
author nanaya <me@nanaya.net>
date Fri, 14 Jul 2023 22:42:20 +0900
parents e07f6ea17deb
children
line wrap: on
line diff
--- a/app/views/tweets/_tweet.atom.erb	Fri Jul 14 01:45:40 2023 +0900
+++ b/app/views/tweets/_tweet.atom.erb	Fri Jul 14 22:42:20 2023 +0900
@@ -1,13 +1,16 @@
 <entry>
-  <id><%= atom_id "#{tweet.user.id}/#{tweet.id}" %></id>
-  <published><%= tweet.created_at.xmlschema %></published>
-  <updated><%= tweet.created_at.xmlschema %></updated>
+  <%
+    created_at = tweet[:created_at].xmlschema
+  %>
+  <id><%= atom_id "#{tweet[:user][:id]}/#{tweet[:id]}" %></id>
+  <published><%= created_at %></published>
+  <updated><%= created_at %></updated>
   <link rel="alternate" type="text/html" href="<%= status_url(tweet) %>"/>
-  <title><%= truncate tweet.unescaped_text, :length => 30 %></title>
+  <title><%= truncate tweet[:message], :length => 30 %></title>
   <content type="html">
     <%= render(:partial => "tweet", :formats => :html, :locals => { :tweet => tweet }).to_str %>
   </content>
   <author>
-    <name><%= tweet.user.screen_name %></name>
+    <name><%= tweet[:user][:username] %></name>
   </author>
 </entry>