From 44967ae9f605ca37b6d88e4e8b11a9cf1fdc2b57 Mon Sep 17 00:00:00 2001 From: pdp8 Date: Thu, 14 Sep 2023 20:20:26 +0200 Subject: note objects fixed, verify reactivated --- views/outbox.erb | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 views/outbox.erb (limited to 'views') diff --git a/views/outbox.erb b/views/outbox.erb new file mode 100644 index 0000000..db840f4 --- /dev/null +++ b/views/outbox.erb @@ -0,0 +1,41 @@ + + + + + pdp8 social + + + + +

pdp8@social.pdp8.info

+ music, pictures and videos: https://pdp8.info + <% @activities.each do |activity| + file = find_file activity['object']['id'] + @object = JSON.load_file file if file and File.exists? file + if @object + mention = mention @object['attributedTo'] %> +
+

' target='_blank'><%= mention %>  + <%= @object['published'] %> + <% if activity['type'] == 'Announce' %> +  (announced) + <% end %> +

+ <%= @object['content']%> + <% if @object['attachment'] + @object['attachment'].each do |att| + case att['mediaType'] + when /audio/ %> +
+ <% when /image/ %> +
'>' alt='<%= att['name'].gsub("'",''').gsub('"','"') if att['name'] %>'> + <% when /video/ %> +
+ <% end %> + <% end %> + <% end %> +

+ <% end %> + <% end %> + + -- cgit v1.2.3