# frozen_string_literal: true require 'uri' require 'base64' require 'digest/sha2' require 'sinatra' SOCIAL_DIR = '/srv/social/' INBOX_DIR = File.join(SOCIAL_DIR, 'inbox') # ARCHIVE_DIR = File.join(SOCIAL_DIR, 'archive') PUBLIC_DIR = File.join(SOCIAL_DIR, 'public') OUTBOX_DIR = File.join(PUBLIC_DIR, 'outbox') FOLLOWERS = File.join(PUBLIC_DIR, 'followers') FOLLOWING_DIR = File.join(PUBLIC_DIR, 'following') TAGS = File.join(PUBLIC_DIR, 'tags') 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/activity+json' set :port, 9292 require_relative 'helpers' require_relative 'client' require_relative 'server'