Class: ActivityPub::ActivitySerializer
- Inherits:
-
BaseSerializer
- Object
- Granola::Serializer
- BaseSerializer
- ActivityPub::ActivitySerializer
- Defined in:
- app/serializers/activitypub/activity_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 11 12 13 |
# File 'app/serializers/activitypub/activity_serializer.rb', line 3 def data { id: ActivityPub::TagManager.instance.activity_uri_for(object), object: parent_object, type: 'Create', actor: ActivityPub::TagManager.instance.uri_for(object.account), published: object.created_at.iso8601, to: ActivityPub::TagManager.instance.to(object), cc: ActivityPub::TagManager.instance.cc(object) } end |