diff options
author | pdp8 <pdp8@pdp8.info> | 2023-07-02 00:37:33 +0200 |
---|---|---|
committer | pdp8 <pdp8@pdp8.info> | 2023-07-02 00:37:33 +0200 |
commit | 7f38d569d8dd2491d1b9b8bc0ff1ae016b02f34f (patch) | |
tree | 5ddd0eba0dce147e8b799351a9f3e20945a08118 /activitypub.rb | |
parent | 086709cae3da7a01a011fe906004c8685fdd2ed0 (diff) |
activity sending/storage unified (send_signed -> outbox)
Diffstat (limited to 'activitypub.rb')
-rw-r--r-- | activitypub.rb | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/activitypub.rb b/activitypub.rb index eefae9b..93bb45a 100644 --- a/activitypub.rb +++ b/activitypub.rb @@ -5,25 +5,26 @@ require 'base64' require 'digest/sha2' require 'sinatra' -USER = 'pdp8' -WWW_DOMAIN = 'pdp8.info' -WWW_URL = "https://#{WWW_DOMAIN}" -SOCIAL_DOMAIN = "social.#{WWW_DOMAIN}" SOCIAL_DIR = '/srv/social/' -INBOX = File.join(SOCIAL_DIR, 'inbox') +INBOX_DIR = File.join(SOCIAL_DIR, 'inbox') +# ARCHIVE_DIR = File.join(SOCIAL_DIR, 'archive') PUBLIC_DIR = File.join(SOCIAL_DIR, 'public') -OUTBOX = File.join(PUBLIC_DIR, 'outbox') +OUTBOX_DIR = File.join(PUBLIC_DIR, 'outbox') FOLLOWERS = File.join(PUBLIC_DIR, 'followers') -FOLLOWING = File.join(PUBLIC_DIR, 'following') +FOLLOWING_DIR = File.join(PUBLIC_DIR, 'following') TAGS = File.join(PUBLIC_DIR, 'tags') -ACCOUNT = "#{USER}@#{SOCIAL_DOMAIN}" +USER = 'pdp8' +SOCIAL_DOMAIN = 'social.pdp8.info' +MENTION = "#{USER}@#{SOCIAL_DOMAIN}" + SOCIAL_URL = "https://#{SOCIAL_DOMAIN}" ACTOR = File.join(SOCIAL_URL, USER) +OUTBOX_URL = File.join(SOCIAL_URL, 'outbox') +FOLLOWING_URL = File.join(SOCIAL_URL, 'following') enable :sessions set :session_secret, File.read('.secret').chomp -# set :default_content_type, 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"' set :default_content_type, 'application/activity+json' set :port, 9292 |