0
0
Fork 0

Remove conversation URI (#11423)

It is not part of ActivityPub and will free up a lot of space
This commit is contained in:
Eugen Rochko 2019-07-28 17:30:12 +02:00 committed by GitHub
parent cfb2ed7823
commit 75f7f9930e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 17 additions and 42 deletions

View file

@ -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