annotate app/views/tweets/_tweet.atom.erb @ 240:c454ea4f7b34 legit-client

Add support for note tweets (with no formatting)
author nanaya <me@nanaya.net>
date Sat, 15 Jul 2023 03:24:56 +0900
parents 7a773720d81f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
94
0c8a8b390145 Now with epic caching
nanaya <me@myconan.net>
parents:
diff changeset
1 <entry>
234
7a773720d81f Totally legit client
nanaya <me@nanaya.net>
parents: 211
diff changeset
2 <%
7a773720d81f Totally legit client
nanaya <me@nanaya.net>
parents: 211
diff changeset
3 created_at = tweet[:created_at].xmlschema
7a773720d81f Totally legit client
nanaya <me@nanaya.net>
parents: 211
diff changeset
4 %>
7a773720d81f Totally legit client
nanaya <me@nanaya.net>
parents: 211
diff changeset
5 <id><%= atom_id "#{tweet[:user][:id]}/#{tweet[:id]}" %></id>
7a773720d81f Totally legit client
nanaya <me@nanaya.net>
parents: 211
diff changeset
6 <published><%= created_at %></published>
7a773720d81f Totally legit client
nanaya <me@nanaya.net>
parents: 211
diff changeset
7 <updated><%= created_at %></updated>
204
70e90ea4b870 Fix uri for nil user
nanaya <me@nanaya.pro>
parents: 172
diff changeset
8 <link rel="alternate" type="text/html" href="<%= status_url(tweet) %>"/>
234
7a773720d81f Totally legit client
nanaya <me@nanaya.net>
parents: 211
diff changeset
9 <title><%= truncate tweet[:message], :length => 30 %></title>
211
e07f6ea17deb Less xhtml more escaping
nanaya <me@nanaya.pro>
parents: 204
diff changeset
10 <content type="html">
e07f6ea17deb Less xhtml more escaping
nanaya <me@nanaya.pro>
parents: 204
diff changeset
11 <%= render(:partial => "tweet", :formats => :html, :locals => { :tweet => tweet }).to_str %>
94
0c8a8b390145 Now with epic caching
nanaya <me@myconan.net>
parents:
diff changeset
12 </content>
0c8a8b390145 Now with epic caching
nanaya <me@myconan.net>
parents:
diff changeset
13 <author>
234
7a773720d81f Totally legit client
nanaya <me@nanaya.net>
parents: 211
diff changeset
14 <name><%= tweet[:user][:username] %></name>
94
0c8a8b390145 Now with epic caching
nanaya <me@myconan.net>
parents:
diff changeset
15 </author>
0c8a8b390145 Now with epic caching
nanaya <me@myconan.net>
parents:
diff changeset
16 </entry>