Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/chat_names/find_user_service.rb')
-rw-r--r--app/services/chat_names/find_user_service.rb13
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