From 7f3023df5be705436544b5724a6b83c2717aa0b8 Mon Sep 17 00:00:00 2001 From: pdp8 Date: Sat, 10 Aug 2024 00:29:02 +0200 Subject: improved outbox html, background sending --- client.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'client.rb') 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') -- cgit v1.2.3