logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

accept_follow_serializer.rb (438B)


  1. # frozen_string_literal: true
  2. class ActivityPub::AcceptFollowSerializer < ActiveModel::Serializer
  3. attributes :id, :type, :actor
  4. has_one :object, serializer: ActivityPub::FollowSerializer
  5. def id
  6. [ActivityPub::TagManager.instance.uri_for(object.target_account), '#accepts/follows/', object.id].join
  7. end
  8. def type
  9. 'Accept'
  10. end
  11. def actor
  12. ActivityPub::TagManager.instance.uri_for(object.target_account)
  13. end
  14. end