summaryrefslogtreecommitdiff
path: root/activitypub.rb
diff options
context:
space:
mode:
authorpdp8 <pdp8@pdp8.info>2023-06-30 15:42:14 +0200
committerpdp8 <pdp8@pdp8.info>2023-06-30 15:42:14 +0200
commit9d95a49ecd7e2f3e49b3462a281f2b86b406cf41 (patch)
treecd9695f2e22632e88eb710beeb041458e7ac3a71 /activitypub.rb
parente328b59ffc2476262dbd076d2478aaade78e649c (diff)
inbox activities handled by dedicated functions
Diffstat (limited to 'activitypub.rb')
-rw-r--r--activitypub.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/activitypub.rb b/activitypub.rb
index 9b63b46..9a1b9d4 100644
--- a/activitypub.rb
+++ b/activitypub.rb
@@ -7,6 +7,13 @@ 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')
+PUBLIC_DIR = File.join(SOCIAL_DIR, 'public')
+OUTBOX = File.join(PUBLIC_DIR, 'outbox')
+FOLLOWERS = File.join(PUBLIC_DIR, 'followers')
+FOLLOWING = File.join(PUBLIC_DIR, 'following')
+TAGS = File.join(PUBLIC_DIR, 'tags')
ACCOUNT = "#{USER}@#{SOCIAL_DOMAIN}"
SOCIAL_URL = "https://#{SOCIAL_DOMAIN}"
@@ -14,7 +21,8 @@ ACTOR = File.join(SOCIAL_URL, USER)
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/ld+json; profile="https://www.w3.org/ns/activitystreams"'
+set :default_content_type, 'application/activity+json'
set :port, 9292
require_relative 'helpers.rb'