闭社主体 forked from https://github.com/tootsuite/mastodon
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.

26 lines
570 B

  1. # frozen_string_literal: true
  2. class ActivityPub::MoveSerializer < ActivityPub::Serializer
  3. attributes :id, :type, :target, :actor
  4. attribute :virtual_object, key: :object
  5. def id
  6. [ActivityPub::TagManager.instance.uri_for(object.account), '#moves/', object.id].join
  7. end
  8. def type
  9. 'Move'
  10. end
  11. def target
  12. ActivityPub::TagManager.instance.uri_for(object.target_account)
  13. end
  14. def virtual_object
  15. ActivityPub::TagManager.instance.uri_for(object.account)
  16. end
  17. def actor
  18. ActivityPub::TagManager.instance.uri_for(object.account)
  19. end
  20. end