Commit 8b3ada75b04ee77571464c2550540623a89c338f
1 parent
d422ee0f
Respect group members in mentionable concern
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/models/concerns/mentionable.rb
... | ... | @@ -15,7 +15,7 @@ module Mentionable |
15 | 15 | matches.each do |match| |
16 | 16 | identifier = match.delete "@" |
17 | 17 | if has_project |
18 | - id = project.users_projects.joins(:user).where(users: { username: identifier }).pluck(:user_id).first | |
18 | + id = project.team.members.find { |u| u.username == identifier }.try(:id) | |
19 | 19 | else |
20 | 20 | id = User.where(username: identifier).pluck(:id).first |
21 | 21 | end | ... | ... |