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
15
app/serializers/activitypub/undo_like_serializer.rb
Normal file
15
app/serializers/activitypub/undo_like_serializer.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ActivityPub::UndoLikeSerializer < ActiveModel::Serializer
|
||||
attributes :type, :actor
|
||||
|
||||
has_one :object, serializer: ActivityPub::LikeSerializer
|
||||
|
||||
def type
|
||||
'Undo'
|
||||
end
|
||||
|
||||
def actor
|
||||
ActivityPub::TagManager.instance.uri_for(object.account)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue