diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-06-04 23:11:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-04 23:11:18 +0200 |
commit | f2b743e715758f6af818f68fb77cd44d2451ae48 (patch) | |
tree | 9221aaac28376655038631851da7228c040b2077 /app/services/favourite_service.rb | |
parent | 48fee1a800a262ce26171d724c15738d083eb6d6 (diff) |
Refactor all ActivityPub deliveries to be serialized and signed through one concern (#10966)
Diffstat (limited to 'app/services/favourite_service.rb')
-rw-r--r-- | app/services/favourite_service.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/services/favourite_service.rb b/app/services/favourite_service.rb index b565bcc32..128a24ad6 100644 --- a/app/services/favourite_service.rb +++ b/app/services/favourite_service.rb @@ -2,6 +2,7 @@ class FavouriteService < BaseService include Authorization + include Payloadable # Favourite a status and notify remote user # @param [Account] account @@ -43,11 +44,7 @@ class FavouriteService < BaseService end def build_json(favourite) - Oj.dump(ActivityPub::LinkedDataSignature.new(ActiveModelSerializers::SerializableResource.new( - favourite, - serializer: ActivityPub::LikeSerializer, - adapter: ActivityPub::Adapter - ).as_json).sign!(favourite.account)) + Oj.dump(serialize_payload(favourite, ActivityPub::LikeSerializer)) end def build_xml(favourite) |