From e4e4dedf8ca423e110787657799137444ca0f8fe Mon Sep 17 00:00:00 2001 From: pdp8 Date: Sat, 10 Feb 2024 00:09:34 +0100 Subject: outbox moved to website --- client.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'client.rb') diff --git a/client.rb b/client.rb index d19c6fc..891a1d8 100644 --- a/client.rb +++ b/client.rb @@ -28,6 +28,7 @@ post '/announce' do # TODO to = ['https://www.w3.org/ns/activitystreams#Public', FOLLOWERS_URL] to << params['attributedTo'] create_activity 'Announce', params['id'], to + outbox_html('announce') 200 end @@ -41,6 +42,11 @@ post '/undo' do # TODO: generalize for announce create_activity 'Undo', params['id'], activity['to'] FileUtils.rm(activity_file) FileUtils.rm(object_file) + if activity_file.match 'create' + outbox_html('create') + elsif activity_file.match 'announce' + outbox_html('announce') + end end 200 end -- cgit v1.2.3