diff options
Diffstat (limited to 'client.rb')
-rw-r--r-- | client.rb | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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') |