Using double splat operator (#5859)
This commit is contained in:
parent
42bcbd36b7
commit
b21db9bbde
25 changed files with 32 additions and 32 deletions
|
@ -3,7 +3,7 @@
|
|||
class ActivityPub::ProcessCollectionService < BaseService
|
||||
include JsonLdHelper
|
||||
|
||||
def call(body, account, options = {})
|
||||
def call(body, account, **options)
|
||||
@account = account
|
||||
@json = Oj.load(body, mode: :strict)
|
||||
@options = options
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AuthorizeFollowService < BaseService
|
||||
def call(source_account, target_account, options = {})
|
||||
def call(source_account, target_account, **options)
|
||||
if options[:skip_follow_request]
|
||||
follow_request = FollowRequest.new(account: source_account, target_account: target_account)
|
||||
else
|
||||
|
|
|
@ -13,7 +13,7 @@ class PostStatusService < BaseService
|
|||
# @option [Doorkeeper::Application] :application
|
||||
# @option [String] :idempotency Optional idempotency key
|
||||
# @return [Status]
|
||||
def call(account, text, in_reply_to = nil, options = {})
|
||||
def call(account, text, in_reply_to = nil, **options)
|
||||
if options[:idempotency].present?
|
||||
existing_id = redis.get("idempotency:status:#{account.id}:#{options[:idempotency]}")
|
||||
return Status.find(existing_id) if existing_id
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ProcessFeedService < BaseService
|
||||
def call(body, account, options = {})
|
||||
def call(body, account, **options)
|
||||
@options = options
|
||||
|
||||
xml = Nokogiri::XML(body)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class RemoveStatusService < BaseService
|
||||
include StreamEntryRenderer
|
||||
|
||||
def call(status, options = {})
|
||||
def call(status, **options)
|
||||
@payload = Oj.dump(event: :delete, payload: status.id.to_s)
|
||||
@status = status
|
||||
@account = status.account
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class SuspendAccountService < BaseService
|
||||
def call(account, options = {})
|
||||
def call(account, **options)
|
||||
@account = account
|
||||
@options = options
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue