Class: ActivityPub::AcceptFollowSerializer
- Inherits:
-
BaseSerializer
- Object
- Granola::Serializer
- BaseSerializer
- ActivityPub::AcceptFollowSerializer
- Defined in:
- app/serializers/activitypub/accept_follow_serializer.rb
Constant Summary
Constants inherited from BaseSerializer
Instance Attribute Summary
Attributes inherited from BaseSerializer
Instance Method Summary collapse
Methods inherited from BaseSerializer
#as_json, #initialize, #to_json
Constructor Details
This class inherits a constructor from ActivityPub::BaseSerializer
Instance Method Details
#data ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'app/serializers/activitypub/accept_follow_serializer.rb', line 3 def data { id: id, type: 'Accept', actor: ActivityPub::TagManager.instance.uri_for(object.target_account), object: ActivityPub::FollowSerializer.new(object).data } end |
#id ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/serializers/activitypub/accept_follow_serializer.rb', line 12 def id [ ActivityPub::TagManager.instance.uri_for(object.target_account), '#accepts/follows/', object.id ].join end |