Add handler for Move activity (#9629)
This commit is contained in:
parent
9b475a4838
commit
0f938ff29c
12 changed files with 136 additions and 3 deletions
|
@ -14,6 +14,7 @@ class ActivityPub::ActorSerializer < ActiveModel::Serializer
|
|||
has_many :virtual_attachments, key: :attachment
|
||||
|
||||
attribute :moved_to, if: :moved?
|
||||
attribute :also_known_as, if: :also_known_as?
|
||||
|
||||
class EndpointsSerializer < ActiveModel::Serializer
|
||||
include RoutingHelper
|
||||
|
@ -116,6 +117,10 @@ class ActivityPub::ActorSerializer < ActiveModel::Serializer
|
|||
ActivityPub::TagManager.instance.uri_for(object.moved_to_account)
|
||||
end
|
||||
|
||||
def also_known_as?
|
||||
!object.also_known_as.empty?
|
||||
end
|
||||
|
||||
class CustomEmojiSerializer < ActivityPub::EmojiSerializer
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue