Class: ActivityPub::UpdateSerializer
Constant Summary
BaseSerializer::CONTEXT
Instance Attribute Summary
#options
Instance Method Summary
collapse
#as_json, #initialize, #to_json
Instance Method Details
#actor ⇒ Object
16
17
18
19
|
# File 'app/serializers/activitypub/update_serializer.rb', line 16
def actor
resource = object.is_a?(Account) ? object : object.account
ActivityPub::TagManager.instance.uri_for(resource)
end
|
#data ⇒ Object
3
4
5
6
7
8
9
10
|
# File 'app/serializers/activitypub/update_serializer.rb', line 3
def data
{
id: id,
type: 'Update',
object: object_serialized,
actor: actor
}
end
|
#id ⇒ Object
12
13
14
|
# File 'app/serializers/activitypub/update_serializer.rb', line 12
def id
[ActivityPub::TagManager.instance.uri_for(object), '#updates/', object.updated_at.to_i].join
end
|
#object_serialized ⇒ Object