summaryrefslogtreecommitdiff
path: root/app/services/notes
diff options
context:
space:
mode:
authormhasbini <mohammad.hasbini@gmail.com>2017-02-28 22:38:19 +0200
committermhasbini <mohammad.hasbini@gmail.com>2017-02-28 22:38:19 +0200
commit9f949d4e24c5939b5ea4071c3e86c514b4d82970 (patch)
tree1011567dfca77bf1d259c2ebfcf8c4f8a0d3a710 /app/services/notes
parentc5b29ed6f36779dbb96f4cdc7b1b0bce8bb8dc5e (diff)
downloadgitlab-ce-9f949d4e24c5939b5ea4071c3e86c514b4d82970.tar.gz
add /award slash command
add /award slash command; Allow posting of just an emoji in comment
Diffstat (limited to 'app/services/notes')
-rw-r--r--app/services/notes/create_service.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/app/services/notes/create_service.rb b/app/services/notes/create_service.rb
index b4f8b33d564..61d66a26932 100644
--- a/app/services/notes/create_service.rb
+++ b/app/services/notes/create_service.rb
@@ -8,14 +8,6 @@ module Notes
note.author = current_user
note.system = false
- if note.award_emoji?
- noteable = note.noteable
- if noteable.user_can_award?(current_user, note.award_emoji_name)
- todo_service.new_award_emoji(noteable, current_user)
- return noteable.create_award_emoji(note.award_emoji_name, current_user)
- end
- end
-
# We execute commands (extracted from `params[:note]`) on the noteable
# **before** we save the note because if the note consists of commands
# only, there is no need be create a note!
@@ -48,7 +40,7 @@ module Notes
note.errors.add(:commands_only, 'Commands applied')
end
- note.commands_changes = command_params.keys
+ note.commands_changes = command_params
end
note