Respect group members in mentionable concern

This commit is contained in:
Dmitriy Zaporozhets 2013-09-04 17:05:48 +03:00
parent a8cb13c85d
commit 6263598314
1 changed files with 1 additions and 1 deletions

View File

@ -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