From 9f9ac9cf3e2aa04ffd76593fff9997ec97134366 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Mon, 26 Dec 2022 02:57:20 +0000 Subject: [PATCH] th: activitypub: switch to fedibird:quoteUri --- app/helpers/context_helper.rb | 2 +- app/serializers/activitypub/note_serializer.rb | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/helpers/context_helper.rb b/app/helpers/context_helper.rb index f4cf1f3a92..7e7dee7f9c 100644 --- a/app/helpers/context_helper.rb +++ b/app/helpers/context_helper.rb @@ -24,7 +24,7 @@ module ContextHelper voters_count: { 'toot' => 'http://joinmastodon.org/ns#', 'votersCount' => 'toot:votersCount' }, olm: { 'toot' => 'http://joinmastodon.org/ns#', 'Device' => 'toot:Device', 'Ed25519Signature' => 'toot:Ed25519Signature', 'Ed25519Key' => 'toot:Ed25519Key', 'Curve25519Key' => 'toot:Curve25519Key', 'EncryptedMessage' => 'toot:EncryptedMessage', 'publicKeyBase64' => 'toot:publicKeyBase64', 'deviceId' => 'toot:deviceId', 'claim' => { '@type' => '@id', '@id' => 'toot:claim' }, 'fingerprintKey' => { '@type' => '@id', '@id' => 'toot:fingerprintKey' }, 'identityKey' => { '@type' => '@id', '@id' => 'toot:identityKey' }, 'devices' => { '@type' => '@id', '@id' => 'toot:devices' }, 'messageFranking' => 'toot:messageFranking', 'messageType' => 'toot:messageType', 'cipherText' => 'toot:cipherText' }, suspended: { 'toot' => 'http://joinmastodon.org/ns#', 'suspended' => 'toot:suspended' }, - quoteUrl: { 'quoteUrl' => 'as:quoteUrl' }, + quoteUri: { 'fedibird' => 'http://fedibird.com/ns#', 'quoteUri' => 'fedibird:quoteUri' }, }.freeze def full_context diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb index c9101b4469..dbde440467 100644 --- a/app/serializers/activitypub/note_serializer.rb +++ b/app/serializers/activitypub/note_serializer.rb @@ -11,8 +11,7 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer :atom_uri, :in_reply_to_atom_uri, :conversation - attribute :quote_url, if: -> { object.quote? } - attribute :misskey_quote, key: :_misskey_quote, if: -> { object.quote? } + attribute :quote_uri, if: -> { object.quote? } attribute :content attribute :content_map, if: :language? @@ -152,12 +151,10 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer end end - def quote_url + def quote_uri ActivityPub::TagManager.instance.uri_for(object.quote) if object.quote? end - alias misskey_quote quote_url - def local? object.account.local? end