Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8ca5fef9
Commit
8ca5fef9
authored
Dec 15, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use single presenter for everything
parent
37057870
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
14 deletions
+2
-14
app/models/project_services/chat_slash_commands_service.rb
app/models/project_services/chat_slash_commands_service.rb
+2
-6
app/models/project_services/mattermost_slash_commands_service.rb
...els/project_services/mattermost_slash_commands_service.rb
+0
-4
app/models/project_services/slack_slash_commands_service.rb
app/models/project_services/slack_slash_commands_service.rb
+0
-4
No files found.
app/models/project_services/chat_slash_commands_service.rb
View file @
8ca5fef9
...
...
@@ -33,10 +33,10 @@ class ChatSlashCommandsService < Service
user
=
find_chat_user
(
params
)
unless
user
url
=
authorize_chat_name_url
(
params
)
return
p
resenter
.
authorize_chat_name
(
url
)
return
Gitlab
::
ChatCommands
::
P
resenter
.
authorize_chat_name
(
url
)
end
Gitlab
::
ChatCommands
::
Command
.
new
(
pr
esenter
,
pr
oject
,
user
,
params
).
execute
Gitlab
::
ChatCommands
::
Command
.
new
(
project
,
user
,
params
).
execute
end
private
...
...
@@ -48,8 +48,4 @@ class ChatSlashCommandsService < Service
def
authorize_chat_name_url
(
params
)
ChatNames
::
AuthorizeUserService
.
new
(
self
,
params
).
execute
end
def
presenter
throw
NotImplementedError
end
end
app/models/project_services/mattermost_slash_commands_service.rb
View file @
8ca5fef9
...
...
@@ -18,8 +18,4 @@ class MattermostSlashCommandsService < ChatService
def
to_param
'mattermost_slash_commands'
end
def
presenter
Gitlab
::
ChatCommands
::
Presenters
::
Mattermost
.
new
end
end
app/models/project_services/slack_slash_commands_service.rb
View file @
8ca5fef9
...
...
@@ -12,8 +12,4 @@ class SlackSlashCommandsService < ChatSlashCommandsService
def
to_param
'slack_slash_commands'
end
def
presenter
Gitlab
::
ChatCommands
::
Presenters
::
Mattermost
.
new
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment