You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
418 B

  1. # frozen_string_literal: true
  2. class ActivityPub::UndoBlockSerializer < ActivityPub::Serializer
  3. attributes :id, :type, :actor
  4. has_one :object, serializer: ActivityPub::BlockSerializer
  5. def id
  6. [ActivityPub::TagManager.instance.uri_for(object.account), '#blocks/', object.id, '/undo'].join
  7. end
  8. def type
  9. 'Undo'
  10. end
  11. def actor
  12. ActivityPub::TagManager.instance.uri_for(object.account)
  13. end
  14. end