提交 8b3ada75 编写于 作者: D Dmitriy Zaporozhets

Respect group members in mentionable concern

上级 d422ee0f
......@@ -15,7 +15,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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册