mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: Muted/Ignore should prevent PMs regardless of case sensitivity
This commit is contained in:
@ -96,7 +96,7 @@ class PostCreator
|
||||
end
|
||||
|
||||
if @opts[:target_usernames].present? && !skip_validations? && !@user.staff?
|
||||
names = @opts[:target_usernames].split(',')
|
||||
names = @opts[:target_usernames].split(',').flatten.map(&:downcase)
|
||||
|
||||
# Make sure max_allowed_message_recipients setting is respected
|
||||
max_allowed_message_recipients = SiteSetting.max_allowed_message_recipients
|
||||
@ -111,7 +111,7 @@ class PostCreator
|
||||
end
|
||||
|
||||
# Make sure none of the users have muted the creator
|
||||
users = User.where(username: names).pluck(:id, :username).to_h
|
||||
users = User.where(username_lower: names).pluck(:id, :username).to_h
|
||||
|
||||
User
|
||||
.joins("LEFT JOIN user_options ON user_options.user_id = users.id")
|
||||
|
Reference in New Issue
Block a user