mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-03-13 21:55:15 +09:00
17 lines
278 B
Ruby
17 lines
278 B
Ruby
module Message::Mentionee
|
|
extend ActiveSupport::Concern
|
|
|
|
def mentionees
|
|
room.users.where(id: mentioned_users.map(&:id))
|
|
end
|
|
|
|
private
|
|
def mentioned_users
|
|
if body.body
|
|
body.body.attachables.grep(User).uniq
|
|
else
|
|
[]
|
|
end
|
|
end
|
|
end
|