-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor all ActivityPub deliveries to be serialized and signed through one concern #10966
Conversation
df89093
to
46dad7b
Compare
46dad7b
to
8a7640c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nitpicks but LGTM overall.
Also, is there an advantage using Oj.dump
over #to_json
?
sign_with = options.delete(:sign_with) | ||
payload = ActiveModelSerializers::SerializableResource.new(record, options.merge(serializer: serializer, adapter: ActivityPub::Adapter)).as_json | ||
|
||
if (record.respond_to?(:sign?) && record.sign?) && signer && signing_enabled? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nitpick, those parenthesis do not help with readability
@@ -0,0 +1,19 @@ | |||
# frozen_string_literal: true | |||
|
|||
module Payloadable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nitpick: this name is weird, especially since it's used by services and not models…
I believe AMS was configured to use Oj in the background so there is no difference, except that the output of |
No description provided.