about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorEvan Minto <evan.minto@gmail.com>2017-04-22 20:21:10 -0700
committerEugen <eugen@zeonfederated.com>2017-04-23 05:21:10 +0200
commit66fd8e782182390df81f1ed46f3a04f3a01d681e (patch)
treef8f6ffb3bfc220e3e8e7efaf273e285b932f1962 /config
parent83e35381814baf4ae5f420531d83c0450716f875 (diff)
ActivityPub: Add basic, read-only support for Outboxes, Notes, and Create/Announce Activities (#2197)
* Clean up collapsible components

* Expose user Outboxes and AS2 representations of statuses

* Save work thus far.

* Fix bad merge.

* Save my work

* Clean up pagination.

* First test working.

* Add tests.

* Add Forbidden error template.

* Revert yarn.lock changes.

* Fix code style deviations and use localized instead of hardcoded English text.
Diffstat (limited to 'config')
-rw-r--r--config/locales/en.yml10
-rw-r--r--config/routes.rb9
2 files changed, 19 insertions, 0 deletions
diff --git a/config/locales/en.yml b/config/locales/en.yml
index b8463673e..778027cec 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -40,6 +40,15 @@ en:
     posts: Posts
     remote_follow: Remote follow
     unfollow: Unfollow
+  activitypub:
+    outbox:
+      name: "%{account_name}'s Outbox"
+      summary: "A collection of activities from user %{account_name}."
+    activity:
+      create:
+        name: "%{account_name} created a note."
+      announce:
+        name: "%{account_name} announced an activity."
   admin:
     accounts:
       are_you_sure: Are you sure?
@@ -206,6 +215,7 @@ en:
       x_months: "%{count}mo"
       x_seconds: "%{count}s"
   errors:
+    '403': You don't have permission to view this page.
     '404': The page you were looking for doesn't exist.
     '410': The page you were looking for doesn't exist anymore.
     '422':
diff --git a/config/routes.rb b/config/routes.rb
index 2c8ac1cff..6893aa06b 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -106,6 +106,15 @@ Rails.application.routes.draw do
     # OEmbed
     get '/oembed', to: 'oembed#show', as: :oembed
 
+    # ActivityPub
+    namespace :activitypub do
+      get '/users/:id/outbox', to: 'outbox#show', as: :outbox
+
+      get '/statuses/:id', to: 'activities#show_status', as: :status
+
+      resources :notes, only: [:show]
+    end
+
     # JSON / REST API
     namespace :v1 do
       resources :statuses, only: [:create, :show, :destroy] do