Add missing ActivityPub representations (#4230)
- Follow, undo follow - Accept follow, reject follow - Like, undo like - Block, undo block - Delete (note) - Update (actor)
This commit is contained in:
parent
902c5cf7ca
commit
d4b097a88c
10 changed files with 162 additions and 0 deletions
18
app/serializers/activitypub/delete_serializer.rb
Normal file
18
app/serializers/activitypub/delete_serializer.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ActivityPub::DeleteSerializer < ActiveModel::Serializer
|
||||
attributes :type, :actor
|
||||
attribute :virtual_object, key: :object
|
||||
|
||||
def type
|
||||
'Delete'
|
||||
end
|
||||
|
||||
def actor
|
||||
ActivityPub::TagManager.instance.uri_for(object.account)
|
||||
end
|
||||
|
||||
def virtual_object
|
||||
ActivityPub::TagManager.instance.uri_for(object)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue