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|
|
matches.each do |match|
|
||||||
identifier = match.delete "@"
|
identifier = match.delete "@"
|
||||||
if has_project
|
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
|
else
|
||||||
id = User.where(username: identifier).pluck(:id).first
|
id = User.where(username: identifier).pluck(:id).first
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue