summaryrefslogtreecommitdiff
path: root/client.rb
diff options
context:
space:
mode:
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')