<% @inbox.each_with_index do |file,i| %> <% item = JSON.parse(File.read(file)) mention = mention(item['attributedTo']) following_path = File.join('public', 'following', mention + '.json') %> ', target='_blank'><%= mention %>  <% File.exists?(following_path) ? method = 'unfollow' : method = 'follow' %>

<%= item['content'] %> <% if item['attachment'] item['attachment'].each do |att| case att['mediaType'] when /audio/ %>
<% when /image/ %>
'>'> <% when /video/ %>
<% else %> <%= att %>
'><%= att['url'] %> <% end %> <% end %> <% end %>

' method='post'>

<% end %>