diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-05-06 20:51:20 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-05-21 03:16:23 -0500 |
commit | 6c374b51537126a2cba29f3eaf74faf1fc64ba96 (patch) | |
tree | 776239f0aaf7a0abed2d09440eccbb1d6d53a7a2 /app/serializers/activitypub | |
parent | 6e8ec7f0a538b5383da49c4435835b78c61da0bc (diff) |
Drop OStatus support. Fix some of the Rspec tests.
Diffstat (limited to 'app/serializers/activitypub')
-rw-r--r-- | app/serializers/activitypub/activity_serializer.rb | 5 | ||||
-rw-r--r-- | app/serializers/activitypub/delete_serializer.rb | 8 | ||||
-rw-r--r-- | app/serializers/activitypub/note_serializer.rb | 15 |
3 files changed, 2 insertions, 26 deletions
diff --git a/app/serializers/activitypub/activity_serializer.rb b/app/serializers/activitypub/activity_serializer.rb index c06d5c87c..21386ab8a 100644 --- a/app/serializers/activitypub/activity_serializer.rb +++ b/app/serializers/activitypub/activity_serializer.rb @@ -5,7 +5,6 @@ class ActivityPub::ActivitySerializer < ActivityPub::Serializer has_one :proper, key: :object, serializer: ActivityPub::NoteSerializer, if: :serialize_object? attribute :proper_uri, key: :object, unless: :serialize_object? - attribute :atom_uri, if: :announce? def id ActivityPub::TagManager.instance.activity_uri_for(object) @@ -35,10 +34,6 @@ class ActivityPub::ActivitySerializer < ActivityPub::Serializer ActivityPub::TagManager.instance.uri_for(object.proper) end - def atom_uri - OStatus::TagManager.instance.uri_for(object) - end - def announce? object.reblog? end diff --git a/app/serializers/activitypub/delete_serializer.rb b/app/serializers/activitypub/delete_serializer.rb index a7d5bd469..c8f918c92 100644 --- a/app/serializers/activitypub/delete_serializer.rb +++ b/app/serializers/activitypub/delete_serializer.rb @@ -2,9 +2,7 @@ class ActivityPub::DeleteSerializer < ActivityPub::Serializer class TombstoneSerializer < ActivityPub::Serializer - context_extensions :atom_uri - - attributes :id, :type, :atom_uri + attributes :id, :type def id ActivityPub::TagManager.instance.uri_for(object) @@ -13,10 +11,6 @@ class ActivityPub::DeleteSerializer < ActivityPub::Serializer def type 'Tombstone' end - - def atom_uri - OStatus::TagManager.instance.uri_for(object) - end end attributes :id, :type, :actor, :to diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb index d05c9c4f8..da99b9606 100644 --- a/app/serializers/activitypub/note_serializer.rb +++ b/app/serializers/activitypub/note_serializer.rb @@ -1,13 +1,12 @@ # frozen_string_literal: true class ActivityPub::NoteSerializer < ActivityPub::Serializer - context_extensions :atom_uri, :conversation, :sensitive, + context_extensions :conversation, :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, :source attribute :content @@ -102,18 +101,6 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer object.active_mentions.to_a.sort_by(&:id) + object.tags.reject { |t| t.local || t.private } + object.emojis end - def atom_uri - return unless object.local? - - OStatus::TagManager.instance.uri_for(object) - end - - def in_reply_to_atom_uri - return unless object.reply? && !object.thread.nil? - - OStatus::TagManager.instance.uri_for(object.thread) - end - def conversation return if object.conversation.nil? |