diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-08-31 00:02:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-31 00:02:59 +0200 |
commit | 2db9ccaf3eeada3106e88e08163495ae8e741574 (patch) | |
tree | 010e0d0238762d0c439461193f30e92f32077599 /app | |
parent | cecf204bbbf9e5a296b4a6d28ffa1bbe27a741ed (diff) |
Add sharedInbox to actors (#4737)
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/activitypub/inboxes_controller.rb | 2 | ||||
-rw-r--r-- | app/serializers/activitypub/actor_serializer.rb | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/app/controllers/activitypub/inboxes_controller.rb b/app/controllers/activitypub/inboxes_controller.rb index 078494c20..5fce505fd 100644 --- a/app/controllers/activitypub/inboxes_controller.rb +++ b/app/controllers/activitypub/inboxes_controller.rb @@ -18,7 +18,7 @@ class ActivityPub::InboxesController < Api::BaseController private def set_account - @account = Account.find_local!(params[:account_username]) + @account = Account.find_local!(params[:account_username]) if params[:account_username] end def body diff --git a/app/serializers/activitypub/actor_serializer.rb b/app/serializers/activitypub/actor_serializer.rb index b15736868..a72ecee24 100644 --- a/app/serializers/activitypub/actor_serializer.rb +++ b/app/serializers/activitypub/actor_serializer.rb @@ -4,8 +4,9 @@ class ActivityPub::ActorSerializer < ActiveModel::Serializer include RoutingHelper attributes :id, :type, :following, :followers, - :inbox, :outbox, :preferred_username, - :name, :summary, :url + :inbox, :outbox, :shared_inbox, + :preferred_username, :name, :summary, + :url has_one :public_key, serializer: ActivityPub::PublicKeySerializer @@ -52,6 +53,10 @@ class ActivityPub::ActorSerializer < ActiveModel::Serializer account_outbox_url(object) end + def shared_inbox + inbox_url + end + def preferred_username object.username end |