From 9f949d4e24c5939b5ea4071c3e86c514b4d82970 Mon Sep 17 00:00:00 2001 From: mhasbini Date: Tue, 28 Feb 2017 22:38:19 +0200 Subject: add /award slash command add /award slash command; Allow posting of just an emoji in comment --- app/services/notes/create_service.rb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'app/services/notes/create_service.rb') 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 -- cgit v1.2.1