view app/views/tweets/_tweet.atom.erb @ 243:bc2f45058c9e legit-client

Prevent caching of rate limited error and combine response handling
author nanaya <me@nanaya.net>
date Sun, 16 Jul 2023 08:53:59 +0900
parents 7a773720d81f
children
line wrap: on
line source

<entry>
  <%
    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[:message], :length => 30 %></title>
  <content type="html">
    <%= render(:partial => "tweet", :formats => :html, :locals => { :tweet => tweet }).to_str %>
  </content>
  <author>
    <name><%= tweet[:user][:username] %></name>
  </author>
</entry>