diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/outbox.erb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/views/outbox.erb b/views/outbox.erb index 7b95439..0efb78c 100644 --- a/views/outbox.erb +++ b/views/outbox.erb @@ -9,20 +9,21 @@ <body> <h1><a href="https://social.pdp8.info/pdp8">pdp8@social.pdp8.info</a></h1> music, pictures and videos: <a href="https://pdp8.info">https://pdp8.info</a> - <% @activities.each do |activity| - file, @object = find_object activity['object']['id'] - if @object - mention = mention @object['attributedTo'] %> + <p> + <% if @type == 'create' %> + <h2>posts | <a href='/outbox/announce'>boosts</a></h2> + <% elsif @type = 'announce' %> + <h2><a href='/outbox/create'>posts</a> | boosts</h2> + <% end %> + <% @objects.each do |object| + mention = mention object['attributedTo'] %> <div class='pdp8'> - <p><b><a href='<%= @object['attributedTo'] %>' target='_blank'><%= mention %></a></b> - <em><%= @object['published'] %></em> - <% if activity['type'] == 'Announce' %> - (<em>announced</em>) - <% end %> + <p><b><a href='<%= object['attributedTo'] %>' target='_blank'><%= mention %></a></b> + <em><%= object['published'] %></em> <p> - <%= @object['content']%> - <% if @object['attachment'] - @object['attachment'].each do |att| + <%= object['content']%> + <% if object['attachment'] + object['attachment'].each do |att| case att['mediaType'] when /audio/ %> <br><audio controls=''><source src='<%= att['url'] %>' type='<%= att['mediaType'] %>'></audio> @@ -34,7 +35,6 @@ <% end %> <% end %> </div> - <% end %> <% end %> </body> </html> |