Add federation relay support (#7998)
* Add federation relay support * Add admin UI for managing relays * Include actor on relay-related activities * Fix i18n
This commit is contained in:
parent
401559c376
commit
e55dce3176
23 changed files with 309 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ActivityPub::DeleteActorSerializer < ActiveModel::Serializer
|
||||
attributes :id, :type, :actor
|
||||
attributes :id, :type, :actor, :to
|
||||
attribute :virtual_object, key: :object
|
||||
|
||||
def id
|
||||
|
@ -19,4 +19,8 @@ class ActivityPub::DeleteActorSerializer < ActiveModel::Serializer
|
|||
def virtual_object
|
||||
actor
|
||||
end
|
||||
|
||||
def to
|
||||
[ActivityPub::TagManager::COLLECTIONS[:public]]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -17,7 +17,7 @@ class ActivityPub::DeleteSerializer < ActiveModel::Serializer
|
|||
end
|
||||
end
|
||||
|
||||
attributes :id, :type, :actor
|
||||
attributes :id, :type, :actor, :to
|
||||
|
||||
has_one :object, serializer: TombstoneSerializer
|
||||
|
||||
|
@ -32,4 +32,8 @@ class ActivityPub::DeleteSerializer < ActiveModel::Serializer
|
|||
def actor
|
||||
ActivityPub::TagManager.instance.uri_for(object.account)
|
||||
end
|
||||
|
||||
def to
|
||||
[ActivityPub::TagManager::COLLECTIONS[:public]]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ActivityPub::UndoAnnounceSerializer < ActiveModel::Serializer
|
||||
attributes :id, :type, :actor
|
||||
attributes :id, :type, :actor, :to
|
||||
|
||||
has_one :object, serializer: ActivityPub::ActivitySerializer
|
||||
|
||||
|
@ -16,4 +16,8 @@ class ActivityPub::UndoAnnounceSerializer < ActiveModel::Serializer
|
|||
def actor
|
||||
ActivityPub::TagManager.instance.uri_for(object.account)
|
||||
end
|
||||
|
||||
def to
|
||||
[ActivityPub::TagManager::COLLECTIONS[:public]]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ActivityPub::UpdateSerializer < ActiveModel::Serializer
|
||||
attributes :id, :type, :actor
|
||||
attributes :id, :type, :actor, :to
|
||||
|
||||
has_one :object, serializer: ActivityPub::ActorSerializer
|
||||
|
||||
|
@ -16,4 +16,8 @@ class ActivityPub::UpdateSerializer < ActiveModel::Serializer
|
|||
def actor
|
||||
ActivityPub::TagManager.instance.uri_for(object)
|
||||
end
|
||||
|
||||
def to
|
||||
[ActivityPub::TagManager::COLLECTIONS[:public]]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue