about summary refs log tree commit diff
path: root/app/services/keys
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-06 21:44:36 -0500
committerGitHub <noreply@github.com>2023-02-07 03:44:36 +0100
commited570050c62115cfbcca8cfcd0de891b729f3e5c (patch)
treeb899dd4b4daa7617c0f9fa236107d2fbe4aa7be7 /app/services/keys
parent6a71bb23c26577c3186a8730b663a37efd29ad1f (diff)
Autofix Rails/EagerEvaluationLogMessage (#23429)
* Autofix Rails/EagerEvaluationLogMessage

* Update spec for debug block syntax
Diffstat (limited to 'app/services/keys')
-rw-r--r--app/services/keys/claim_service.rb2
-rw-r--r--app/services/keys/query_service.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/services/keys/claim_service.rb b/app/services/keys/claim_service.rb
index ae9e24a24..0451c3cb1 100644
--- a/app/services/keys/claim_service.rb
+++ b/app/services/keys/claim_service.rb
@@ -58,7 +58,7 @@ class Keys::ClaimService < BaseService
 
     @result = Result.new(@target_account, @device_id, key_id: json['id'], key: json['publicKeyBase64'], signature: json.dig('signature', 'signatureValue'))
   rescue HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::Error => e
-    Rails.logger.debug "Claiming one-time key for #{@target_account.acct}:#{@device_id} failed: #{e}"
+    Rails.logger.debug { "Claiming one-time key for #{@target_account.acct}:#{@device_id} failed: #{e}" }
     nil
   end
 
diff --git a/app/services/keys/query_service.rb b/app/services/keys/query_service.rb
index ac3388bdc..404854c9f 100644
--- a/app/services/keys/query_service.rb
+++ b/app/services/keys/query_service.rb
@@ -73,7 +73,7 @@ class Keys::QueryService < BaseService
       Device.new(device_id: device['id'], name: device['name'], identity_key: device.dig('identityKey', 'publicKeyBase64'), fingerprint_key: device.dig('fingerprintKey', 'publicKeyBase64'), claim_url: device['claim'])
     end
   rescue HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::Error => e
-    Rails.logger.debug "Querying devices for #{@account.acct} failed: #{e}"
+    Rails.logger.debug { "Querying devices for #{@account.acct} failed: #{e}" }
     nil
   end
 end