about summary refs log tree commit diff
path: root/app/services/report_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-06-04 23:11:18 +0200
committerGitHub <noreply@github.com>2019-06-04 23:11:18 +0200
commitf2b743e715758f6af818f68fb77cd44d2451ae48 (patch)
tree9221aaac28376655038631851da7228c040b2077 /app/services/report_service.rb
parent48fee1a800a262ce26171d724c15738d083eb6d6 (diff)
Refactor all ActivityPub deliveries to be serialized and signed through one concern (#10966)
Diffstat (limited to 'app/services/report_service.rb')
-rw-r--r--app/services/report_service.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/app/services/report_service.rb b/app/services/report_service.rb
index 73bd6694f..1e955c1e7 100644
--- a/app/services/report_service.rb
+++ b/app/services/report_service.rb
@@ -1,6 +1,8 @@
 # frozen_string_literal: true
 
 class ReportService < BaseService
+  include Payloadable
+
   def call(source_account, target_account, options = {})
     @source_account = source_account
     @target_account = target_account
@@ -44,12 +46,7 @@ class ReportService < BaseService
   end
 
   def payload
-    Oj.dump(ActiveModelSerializers::SerializableResource.new(
-      @report,
-      serializer: ActivityPub::FlagSerializer,
-      adapter: ActivityPub::Adapter,
-      account: some_local_account
-    ).as_json)
+    Oj.dump(serialize_payload(@report, ActivityPub::FlagSerializer, account: some_local_account))
   end
 
   def some_local_account