From c727922afd124ae59e05b2da56634a271863f8af Mon Sep 17 00:00:00 2001 From: pdp8 Date: Sat, 3 Jun 2023 19:38:21 +0200 Subject: public dirs ignored --- views/inbox.erb | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 views/inbox.erb (limited to 'views/inbox.erb') diff --git a/views/inbox.erb b/views/inbox.erb new file mode 100644 index 0000000..a3e3f83 --- /dev/null +++ b/views/inbox.erb @@ -0,0 +1,50 @@ + + + + + + + <% @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 %> <%= item['published'].sub('T', ' ') %> + <% 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 %> + + -- cgit v1.2.3