summaryrefslogtreecommitdiff
path: root/client.rb
diff options
context:
space:
mode:
authorpdp8 <pdp8@pdp8.info>2024-08-10 00:29:02 +0200
committerpdp8 <pdp8@pdp8.info>2024-08-10 00:29:02 +0200
commit7f3023df5be705436544b5724a6b83c2717aa0b8 (patch)
tree99687362f33cdf6c8f83f2cdd2d20875d8df0480 /client.rb
parent060492722d6137225a9e00add6c7f150d014927d (diff)
improved outbox html, background sending
Diffstat (limited to 'client.rb')
-rw-r--r--client.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/client.rb b/client.rb
index c47000d..4f1ee51 100644
--- a/client.rb
+++ b/client.rb
@@ -38,12 +38,11 @@ post '/undo' do # TODO: generalize for announce
activity = JSON.load_file(activity_file)
next unless activity['id'] == params['id']
- object_file = File.join(dir, activity['object']['id'].sub('https://', ''))
- # object_file, object = find_object activity['object']['id']
create_activity 'Undo', params['id'], activity['to']
FileUtils.rm(activity_file)
- FileUtils.rm(object_file)
if activity_file.match 'create'
+ object_file = File.join(SOCIAL_DIR, activity['object']['id'].sub('https://', ''))
+ FileUtils.rm(object_file)
outbox_html('create')
elsif activity_file.match 'announce'
outbox_html('announce')