diff options
author | pdp8 <pdp8@pdp8.info> | 2023-08-14 17:42:57 +0200 |
---|---|---|
committer | pdp8 <pdp8@pdp8.info> | 2023-08-14 17:42:57 +0200 |
commit | 8cb9bc7e4d516a27b4fe27ba0d0a9c40497e003d (patch) | |
tree | a6d9626b248849a5d620e644144880d8febb1df1 /helpers.rb | |
parent | 9781dda58c3d2926f928544a8155d493fc2f1ca2 (diff) |
undo/delete activities for outbox posts, cleanup
Diffstat (limited to 'helpers.rb')
-rw-r--r-- | helpers.rb | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -46,7 +46,7 @@ helpers do tag_path = File.join(TAGS[:dir], tag['name'].sub('#', '')) + '.json' tag_collection = if File.exist? tag_path - JSON.parse(File.read(tag_path)) + JSON.load_file(tag_path) else { '@context' => 'https://www.w3.org/ns/activitystreams', @@ -92,8 +92,7 @@ helpers do begin uri = URI(url) rescue StandardError => e - p url - p e + p url, e return nil end httpdate = Time.now.utc.httpdate @@ -112,8 +111,7 @@ helpers do if $CHILD_STATUS.success? response else - p url - p response + p url, response nil end end @@ -172,7 +170,7 @@ helpers do def find_file(id) Dir[File.join('*', 'object', '*', '*.json')].find do |f| - JSON.parse(File.read(f))['id'] == id + JSON.load_file(f)['id'] == id end end end |