about summary refs log tree commit diff
path: root/app/serializers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-07-28 17:30:12 +0200
committerGitHub <noreply@github.com>2019-07-28 17:30:12 +0200
commit75f7f9930eb2a6f5c4041ec44fe0aa795c9ec449 (patch)
tree446b7fa050fa9e4c624a46eef874c5bd4441137e /app/serializers
parentcfb2ed78231758a79af038a964ab7f7b7b35274e (diff)
Remove conversation URI (#11423)
It is not part of ActivityPub and will free up a lot of space
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/activitypub/note_serializer.rb15
1 files changed, 2 insertions, 13 deletions
diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb
index 67f596e78..88b50b3ea 100644
--- a/app/serializers/activitypub/note_serializer.rb
+++ b/app/serializers/activitypub/note_serializer.rb
@@ -1,14 +1,13 @@
 # frozen_string_literal: true
 
 class ActivityPub::NoteSerializer < ActivityPub::Serializer
-  context_extensions :atom_uri, :conversation, :sensitive,
+  context_extensions :atom_uri, :sensitive,
                      :hashtag, :emoji, :focal_point, :blurhash
 
   attributes :id, :type, :summary,
              :in_reply_to, :published, :url,
              :attributed_to, :to, :cc, :sensitive,
-             :atom_uri, :in_reply_to_atom_uri,
-             :conversation
+             :atom_uri, :in_reply_to_atom_uri
 
   attribute :content
   attribute :content_map, if: :language?
@@ -110,16 +109,6 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
     OStatus::TagManager.instance.uri_for(object.thread)
   end
 
-  def conversation
-    return if object.conversation.nil?
-
-    if object.conversation.uri?
-      object.conversation.uri
-    else
-      OStatus::TagManager.instance.unique_tag(object.conversation.created_at, object.conversation.id, 'Conversation')
-    end
-  end
-
   def local?
     object.account.local?
   end