Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode committed Jan 17, 2025
1 parent 5d79bd0 commit 02450da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/concerns/payloadable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def serialize_payload(record, serializer, options = {})
always_sign_unsafe = options.delete(:always_sign_unsafe)
payload = ActiveModelSerializers::SerializableResource.new(record, options.merge(serializer: serializer, adapter: ActivityPub::Adapter)).as_json
object = record.respond_to?(:virtual_object) ? record.virtual_object : record
bearcap = object.is_a?(String) && record.respond_to?(:type) && (record.type == 'Create' || record.type == 'Update')
bearcap = object.is_a?(String) && record.respond_to?(:type) && ['Create', 'Update'].include?(record.type)

if ((object.respond_to?(:sign?) && object.sign?) && signer && (always_sign || signing_enabled?)) || bearcap || (signer && always_sign_unsafe)
ActivityPub::LinkedDataSignature.new(payload).sign!(signer, sign_with: sign_with)
Expand Down

0 comments on commit 02450da

Please sign in to comment.