diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /app/services/chat_names/find_user_service.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'app/services/chat_names/find_user_service.rb')
-rw-r--r-- | app/services/chat_names/find_user_service.rb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/app/services/chat_names/find_user_service.rb b/app/services/chat_names/find_user_service.rb index 3dd3ba7f01c..3b204d51bab 100644 --- a/app/services/chat_names/find_user_service.rb +++ b/app/services/chat_names/find_user_service.rb @@ -2,9 +2,9 @@ module ChatNames class FindUserService - def initialize(integration, params) - @integration = integration - @params = params + def initialize(team_id, user_id) + @team_id = team_id + @user_id = user_id end def execute @@ -17,12 +17,13 @@ module ChatNames private + attr_reader :team_id, :user_id + # rubocop: disable CodeReuse/ActiveRecord def find_chat_name ChatName.find_by( - integration: @integration, - team_id: @params[:team_id], - chat_id: @params[:user_id] + team_id: team_id, + chat_id: user_id ) end # rubocop: enable CodeReuse/ActiveRecord |