Respect group members in mentionable concern
This commit is contained in:
parent
a8cb13c85d
commit
6263598314
|
@ -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…
Reference in New Issue