diff --git a/jh/lib/gitlab/chatops/feishu_bot_handler.rb b/jh/lib/gitlab/chatops/feishu_bot_handler.rb index 4e5b13c445f1fae3dac5731ee98af6d72cbe72a4..bc6a10db318aec41dcea79f7d060cfd66c509f3a 100644 --- a/jh/lib/gitlab/chatops/feishu_bot_handler.rb +++ b/jh/lib/gitlab/chatops/feishu_bot_handler.rb @@ -21,9 +21,9 @@ class FeishuBotHandler < BaseBotHandler private def process_url_verification! - return unless params.dig(:type) == URL_VERIFICATION_TYPE + return unless params[:type] == URL_VERIFICATION_TYPE - response = { challenge: params.dig(:challenge) } + response = { challenge: params[:challenge] } raise UrlVerificationError.new(nil, response) end diff --git a/jh/lib/gitlab/ones/query.rb b/jh/lib/gitlab/ones/query.rb index 9dc931677175e85a92924ea4f9ebbf074567158e..64b41365e22cd1c0b6c8bc9f115424c4cc62d15e 100644 --- a/jh/lib/gitlab/ones/query.rb +++ b/jh/lib/gitlab/ones/query.rb @@ -111,7 +111,7 @@ def comments return [] if task_uuid_params.blank? user_keys = [] - comments = client.message_query(task_uuid_params).dig('messages').filter do |comment| + comments = client.message_query(task_uuid_params)['messages'].filter do |comment| next if comment['type'] != 'discussion' || comment['ref_type'] != 'task' user_keys << "user-#{comment['from']}" diff --git a/jh/spec/requests/api/captcha_spec.rb b/jh/spec/requests/api/captcha_spec.rb index cd22da60844c97a6377f42a4bc0cd3c74c638971..3146edd7ea86fff8fd2d8b5f9c99b9c709d901ca 100644 --- a/jh/spec/requests/api/captcha_spec.rb +++ b/jh/spec/requests/api/captcha_spec.rb @@ -52,7 +52,7 @@ it 'passes the captcha' do post_graphql(mutation, current_user: user, headers: headers) - expect(json_response.dig('errors')).to be_nil + expect(json_response['errors']).to be_nil end end