Arpit Jalan
2020-05-25 21:34:05 +05:30
parent 302b37c805
commit e8fb9d4066
3 changed files with 7 additions and 7 deletions

View File

@ -747,8 +747,8 @@ class PostsController < ApplicationController
end
if recipients
recipients = recipients.split(",")
groups = Group.messageable(current_user).where('name in (?)', recipients).pluck('name')
recipients = recipients.split(",").map(&:downcase)
groups = Group.messageable(current_user).where('lower(name) in (?)', recipients).pluck('name')
recipients -= groups
emails = recipients.select { |user| user.match(/@/) }
recipients -= emails