about summary refs log tree commit diff
path: root/app/services/remove_status_service.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-06-07 22:15:44 +0200
committerGitHub <noreply@github.com>2019-06-07 22:15:44 +0200
commit11c28abcfebcf8827f99a86540076347f1a1edff (patch)
treeb5d615001967cf102e88fac86b8ddb3227600109 /app/services/remove_status_service.rb
parent83600198961cce9bfe82cf0f0c33286703bc86d1 (diff)
parentaec3fa35fda50e7f618dcf8b8f14e78a995583f4 (diff)
Merge pull request #1097 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/services/remove_status_service.rb')
-rw-r--r--app/services/remove_status_service.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/app/services/remove_status_service.rb b/app/services/remove_status_service.rb
index 6e4998e07..98972fc70 100644
--- a/app/services/remove_status_service.rb
+++ b/app/services/remove_status_service.rb
@@ -3,6 +3,7 @@
 class RemoveStatusService < BaseService
   include StreamEntryRenderer
   include Redisable
+  include Payloadable
 
   def call(status, **options)
     @payload      = Oj.dump(event: :delete, payload: status.id.to_s)
@@ -116,15 +117,7 @@ class RemoveStatusService < BaseService
   end
 
   def signed_activity_json
-    @signed_activity_json ||= Oj.dump(ActivityPub::LinkedDataSignature.new(activity_json).sign!(@account))
-  end
-
-  def activity_json
-    @activity_json ||= ActiveModelSerializers::SerializableResource.new(
-      @status,
-      serializer: @status.reblog? ? ActivityPub::UndoAnnounceSerializer : ActivityPub::DeleteSerializer,
-      adapter: ActivityPub::Adapter
-    ).as_json
+    @signed_activity_json ||= Oj.dump(serialize_payload(@status, @status.reblog? ? ActivityPub::UndoAnnounceSerializer : ActivityPub::DeleteSerializer, signer: @account))
   end
 
   def remove_reblogs