summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorpdp8 <pdp8@pdp8.info>2023-06-30 15:42:14 +0200
committerpdp8 <pdp8@pdp8.info>2023-06-30 15:42:14 +0200
commit9d95a49ecd7e2f3e49b3462a281f2b86b406cf41 (patch)
treecd9695f2e22632e88eb710beeb041458e7ac3a71 /views
parente328b59ffc2476262dbd076d2478aaade78e649c (diff)
inbox activities handled by dedicated functions
Diffstat (limited to 'views')
-rw-r--r--views/index.erb2
-rw-r--r--views/item.erb6
2 files changed, 5 insertions, 3 deletions
diff --git a/views/index.erb b/views/index.erb
index 0021ec9..b512911 100644
--- a/views/index.erb
+++ b/views/index.erb
@@ -13,7 +13,7 @@
<%= html item %>
<% end %>
<% if @dir == 'inbox' %>
- <form action='delete_all' method='post'>
+ <form action='/delete' method='post'>
<button>Delete all</button>
</form>
<% end %>
diff --git a/views/item.erb b/views/item.erb
index ebc632e..8036b39 100644
--- a/views/item.erb
+++ b/views/item.erb
@@ -1,7 +1,9 @@
<div style='margin-left:<%= @item[:indent] %>em' id='<%= @item[:nr] %>'>
<b><a href='<%= @item[:actor_url] %>', target='_blank'><%= @item[:mention] %></a></b>&nbsp;
<% if @item[:mention] != ACCOUNT %>
- <form action='<%= File.join @item[:follow], @item[:mention] %>' method='post'>
+ <form action='/follow' method='post'>
+ <input type='hidden' name='follow' value='<%= @item[:mention] %>' />
+ <input type='hidden' name='redirect' value='/<%= @dir.sub('inbox','') %>#<%= @item[:nr] %>' />
<button><%= @item[:follow].capitalize %></button>
</form>
&nbsp;
@@ -37,7 +39,7 @@
<% end %>
<p>
<button class="reply" data-index='<%= @item[:nr] %>'>Reply</button>
- <form action='/outbox' method='post' id='form<%= @item[:nr] %>' style='display:none;' >
+ <form action='/' method='post' id='form<%= @item[:nr] %>' style='display:none;' >
<input type='hidden' name='to' value='<%= @item[:actor_url] %>' />
<input type='hidden' name='inReplyTo' value='<%= @item[:id] %>' />
<input type='hidden' name='redirect' value='/<%= @dir.sub('inbox','') %>#<%= @item[:nr] %>' />