summaryrefslogtreecommitdiff
path: root/application.rb
diff options
context:
space:
mode:
authorpdp8 <pdp8@pdp8.info>2023-09-09 16:02:50 +0200
committerpdp8 <pdp8@pdp8.info>2023-09-09 16:02:50 +0200
commit3a87028b34c969744f6c63ba73947cfa32156e7d (patch)
tree67b46c322a13b5c3c51c0309d71fe6241876a880 /application.rb
parent9ecb046ed70c9431f97eab1d761aa9fb22f8f73c (diff)
update and clean-inbox added, no outbox send for delete, recursive create for objects with activities (lemmy)
Diffstat (limited to 'application.rb')
-rw-r--r--application.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/application.rb b/application.rb
index a03d98c..5236685 100644
--- a/application.rb
+++ b/application.rb
@@ -1,10 +1,8 @@
-# frozen_string_literal: true
-
require 'uri'
require 'base64'
require 'digest/sha2'
+require 'time'
require 'rack/protection'
-# require 'rack/contrib'
require 'sinatra'
SOCIAL_DIR = '/srv/social/'
@@ -25,15 +23,13 @@ INBOX = { dir: File.join(SOCIAL_DIR, 'inbox') }
OUTBOX = { dir: File.join(SOCIAL_DIR, 'outbox'), url: File.join(SOCIAL_URL, 'outbox') }
TAGS = { dir: File.join(PUBLIC_DIR, 'tags'), url: File.join(SOCIAL_URL, 'tags') }
FOLLOWERS_URL = 'https://social.pdp8.info/followers'
+VISITED = File.join(INBOX[:dir], 'visited')
+ACTIVITIES = %i[create announce follow accept undo delete like update move]
CONTENT_TYPE = 'application/activity+json'
# CONTENT_TYPE = 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
use Rack::Protection
-# use Rack::MailExceptions do |mail|
-# mail.to 'info@pdp8.info'
-# mail.smtp false
-# end
enable :sessions
set :environment, :production