diff options
author | Rémy Coutable <remy@rymai.me> | 2017-08-07 16:45:10 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-08-07 16:45:10 +0300 |
commit | cfcd1601522c52be96097956b0e3a56be3a3ffcb (patch) | |
tree | fb7d76383e80e0a257dfa20ac229a029e5c3799a /app | |
parent | c1a8cffe7e0769d28be3e03aba938069d29c8902 (diff) | |
parent | 74f8b5c3d0581cdc8a88171a08200d89895ed9df (diff) |
Merge branch 'add-assign-me-alias' into 'master'
Add `/assign me` alias support for assigning issuables to oneself
Closes #35304
See merge request !13334
Diffstat (limited to 'app')
-rw-r--r-- | app/services/quick_actions/interpret_service.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/services/quick_actions/interpret_service.rb b/app/services/quick_actions/interpret_service.rb index c22bf7498bb..c7832c47e1a 100644 --- a/app/services/quick_actions/interpret_service.rb +++ b/app/services/quick_actions/interpret_service.rb @@ -511,7 +511,12 @@ module QuickActions users = extract_references(params, :user) if users.empty? - users = User.where(username: params.split(' ').map(&:strip)) + users = + if params == 'me' + [current_user] + else + User.where(username: params.split(' ').map(&:strip)) + end end users |