Revert "FIX: when creating new PM username/groupname should be case-insensitive"

This reverts commit 2be79d94f5226099d287aa9c69e5a2814baff420.

This is affecting multiple code path. Investigating.
This commit is contained in:
Arpit Jalan
2020-05-25 20:10:14 +05:30
parent 30849c8b37
commit 302b37c805
3 changed files with 6 additions and 6 deletions

View File

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