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:
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
|
Reference in New Issue
Block a user