0
0
Fork 0

Define missing JSON-LD properties (#4767)

Using _: property names is discouraged, as in the future,
canonicalization may throw an error when encountering that instead
of discarding it silently like it does now.

We are defining some ActivityStreams properties which we expect
to land in ActivityStreams eventually, to ensure that future versions
of Mastodon will remain compatible with this even once that happens.
Those would be `locked`, `sensitive` and `Hashtag`

We are defining a custom context inline for some properties which we
do not expect to land in any other context. `atomUri`, `inReplyToAtomUri`
and `conversation` are part of the custom defined OStatus context.
This commit is contained in:
Eugen Rochko 2017-09-02 14:01:23 +02:00 committed by GitHub
parent 1b1e025b41
commit 1b5806b744
8 changed files with 41 additions and 17 deletions

View file

@ -2,8 +2,7 @@
class ActivityPub::DeleteSerializer < ActiveModel::Serializer
class TombstoneSerializer < ActiveModel::Serializer
attributes :id, :type
attribute :atom_uri, key: '_:atomUri'
attributes :id, :type, :atom_uri
def id
ActivityPub::TagManager.instance.uri_for(object)