From d4b097a88cb43105be86ea06fe4a4dd7830b8416 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 17 Jul 2017 10:57:04 +0200 Subject: Add missing ActivityPub representations (#4230) - Follow, undo follow - Accept follow, reject follow - Like, undo like - Block, undo block - Delete (note) - Update (actor) --- app/serializers/activitypub/update_serializer.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 app/serializers/activitypub/update_serializer.rb (limited to 'app/serializers/activitypub/update_serializer.rb') diff --git a/app/serializers/activitypub/update_serializer.rb b/app/serializers/activitypub/update_serializer.rb new file mode 100644 index 000000000..322305da8 --- /dev/null +++ b/app/serializers/activitypub/update_serializer.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class ActivityPub::UpdateSerializer < ActiveModel::Serializer + attributes :type, :actor + + has_one :object, serializer: ActivityPub::ActorSerializer + + def type + 'Update' + end + + def actor + ActivityPub::TagManager.instance.uri_for(object) + end +end -- cgit