Skip to content
Snippets Groups Projects
Commit 62635983 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Respect group members in mentionable concern

parent a8cb13c8
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -50,7 +50,7 @@ module Mentionable
matches.each do |match|
identifier = match.delete "@"
if has_project
id = project.users_projects.joins(:user).where(users: { username: identifier }).pluck(:user_id).first
id = project.team.members.find { |u| u.username == identifier }.try(:id)
else
id = User.where(username: identifier).pluck(:id).first
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment