Send one Delete of Actor in ActivityPub when account is suspended (#6172)

This commit is contained in:
Eugen Rochko
2018-01-04 14:40:49 +01:00
committed by GitHub
parent 3bee0996c5
commit 02ba03d6db
3 changed files with 35 additions and 37 deletions

View 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