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:
authormhasbini <mohammad.hasbini@gmail.com>2017-02-28 23:38:19 +0300
committermhasbini <mohammad.hasbini@gmail.com>2017-02-28 23:38:19 +0300
commit9f949d4e24c5939b5ea4071c3e86c514b4d82970 (patch)
tree1011567dfca77bf1d259c2ebfcf8c4f8a0d3a710 /app/controllers/projects/notes_controller.rb
parentc5b29ed6f36779dbb96f4cdc7b1b0bce8bb8dc5e (diff)
add /award slash command
add /award slash command; Allow posting of just an emoji in comment
Diffstat (limited to 'app/controllers/projects/notes_controller.rb')
-rw-r--r--app/controllers/projects/notes_controller.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/app/controllers/projects/notes_controller.rb b/app/controllers/projects/notes_controller.rb
index b033f7b5ea9..5cf3a7f593b 100644
--- a/app/controllers/projects/notes_controller.rb
+++ b/app/controllers/projects/notes_controller.rb
@@ -148,17 +148,10 @@ class Projects::NotesController < Projects::ApplicationController
def note_json(note)
attrs = {
- award: false,
id: note.id
}
- if note.is_a?(AwardEmoji)
- attrs.merge!(
- valid: note.valid?,
- award: true,
- name: note.name
- )
- elsif note.persisted?
+ if note.persisted?
Banzai::NoteRenderer.render([note], @project, current_user)
attrs.merge!(
@@ -198,7 +191,7 @@ class Projects::NotesController < Projects::ApplicationController
)
end
- attrs[:commands_changes] = note.commands_changes unless attrs[:award]
+ attrs[:commands_changes] = note.commands_changes
attrs
end