summaryrefslogtreecommitdiffstats
path: root/app/serializers/activitypub/actor_serializer.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-09-02 14:01:23 +0200
committerGitHub <noreply@github.com>2017-09-02 14:01:23 +0200
commit1b5806b74475213ae45b483d08a29daa40988f84 (patch)
tree7969ae4b382b7a02511d415a5fc0bbfd5c1c046c /app/serializers/activitypub/actor_serializer.rb
parent1b1e025b41e9ad83e76208f8a6c8f7044fde68b7 (diff)
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.
Diffstat (limited to 'app/serializers/activitypub/actor_serializer.rb')
-rw-r--r--app/serializers/activitypub/actor_serializer.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/serializers/activitypub/actor_serializer.rb b/app/serializers/activitypub/actor_serializer.rb
index a72ecee24bb..f004dc326a9 100644
--- a/app/serializers/activitypub/actor_serializer.rb
+++ b/app/serializers/activitypub/actor_serializer.rb
@@ -6,12 +6,10 @@ class ActivityPub::ActorSerializer < ActiveModel::Serializer
attributes :id, :type, :following, :followers,
:inbox, :outbox, :shared_inbox,
:preferred_username, :name, :summary,
- :url
+ :url, :locked
has_one :public_key, serializer: ActivityPub::PublicKeySerializer
- attribute :locked, key: '_:locked'
-
class ImageSerializer < ActiveModel::Serializer
include RoutingHelper