diff options
author | multiple creatures <dev@multiple-creature.party> | 2020-01-04 10:16:52 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-01-04 10:17:43 -0600 |
commit | d0769f0309e0bae477d955c6433b8baec034f848 (patch) | |
tree | f574108f0a2649041e51cca3e733f62e83620297 /app/serializers/activitypub | |
parent | 244a90b45e926ebc37685ff5f79a011381b1eb97 (diff) |
monsterpit says trans rights!!!
Diffstat (limited to 'app/serializers/activitypub')
-rw-r--r-- | app/serializers/activitypub/actor_serializer.rb | 8 | ||||
-rw-r--r-- | app/serializers/activitypub/note_serializer.rb | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/app/serializers/activitypub/actor_serializer.rb b/app/serializers/activitypub/actor_serializer.rb index 7ea28afd5..7297d7c42 100644 --- a/app/serializers/activitypub/actor_serializer.rb +++ b/app/serializers/activitypub/actor_serializer.rb @@ -7,14 +7,14 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer context_extensions :manually_approves_followers, :featured, :also_known_as, :moved_to, :property_value, :hashtag, :emoji, - :adult_content, :gently, :kobold, :froze, :big + :adult_content, :gently, :kobold, :froze, :big, :trans attributes :id, :type, :following, :followers, :inbox, :outbox, :featured, :preferred_username, :name, :summary, :url, :manually_approves_followers, :gently, :kobold, :adult_content, - :froze, :tails_never_fail + :froze, :tails_never_fail, :trans has_one :public_key, serializer: ActivityPub::PublicKeySerializer @@ -41,6 +41,10 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer delegate :moved?, to: :object + def trans + 'rights' + end + def id account_url(object) end diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb index 4b3612d52..bc9fcacf4 100644 --- a/app/serializers/activitypub/note_serializer.rb +++ b/app/serializers/activitypub/note_serializer.rb @@ -3,13 +3,13 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer context_extensions :conversation, :sensitive, :big, :hashtag, :emoji, :focal_point, :blurhash, - :reject_replies + :reject_replies, :trans attributes :id, :type, :summary, :in_reply_to, :published, :updated, :url, :attributed_to, :to, :cc, :sensitive, :conversation, :source, :tails_never_fail, - :reject_replies + :reject_replies, :trans attribute :content attribute :content_map, if: :language? @@ -25,6 +25,10 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer attribute :end_time, if: :poll_and_expires? attribute :closed, if: :poll_and_expired? + def trans + 'rights' + end + def id raise Mastodon::NotPermittedError, 'Local-only statuses should not be serialized' if object.local_only? ActivityPub::TagManager.instance.uri_for(object) |