Send one Delete of Actor in ActivityPub when account is suspended (#6172)
This commit is contained in:
parent
3bee0996c5
commit
02ba03d6db
3 changed files with 35 additions and 37 deletions
22
app/serializers/activitypub/delete_actor_serializer.rb
Normal file
22
app/serializers/activitypub/delete_actor_serializer.rb
Normal file
|
@ -0,0 +1,22 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ActivityPub::DeleteActorSerializer < ActiveModel::Serializer
|
||||
attributes :id, :type, :actor
|
||||
attribute :virtual_object, key: :object
|
||||
|
||||
def id
|
||||
[ActivityPub::TagManager.instance.uri_for(object), '#delete'].join
|
||||
end
|
||||
|
||||
def type
|
||||
'Delete'
|
||||
end
|
||||
|
||||
def actor
|
||||
ActivityPub::TagManager.instance.uri_for(object)
|
||||
end
|
||||
|
||||
def virtual_object
|
||||
actor
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue