Refactor all ActivityPub deliveries to be serialized and signed through one concern (#10966)
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
class ReblogService < BaseService
|
||||
include Authorization
|
||||
include StreamEntryRenderer
|
||||
include Payloadable
|
||||
|
||||
# Reblog a status and notify its remote author
|
||||
# @param [Account] account Account to reblog from
|
||||
@ -53,10 +54,6 @@ class ReblogService < BaseService
|
||||
end
|
||||
|
||||
def build_json(reblog)
|
||||
Oj.dump(ActivityPub::LinkedDataSignature.new(ActiveModelSerializers::SerializableResource.new(
|
||||
reblog,
|
||||
serializer: ActivityPub::ActivitySerializer,
|
||||
adapter: ActivityPub::Adapter
|
||||
).as_json).sign!(reblog.account))
|
||||
Oj.dump(serialize_payload(reblog, ActivityPub::ActivitySerializer, signer: reblog.account))
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user