mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: created:@ search keyword for uppercase usernames (#22878)
The filter wasn't working if the username had uppercase letters.
This commit is contained in:
@@ -491,7 +491,7 @@ class Search
|
||||
end
|
||||
|
||||
advanced_filter(/\Acreated:@(.*)\z/i) do |posts, match|
|
||||
user_id = User.where(username: match.downcase).pick(:id)
|
||||
user_id = User.where(username_lower: match.downcase).pick(:id)
|
||||
posts.where(user_id: user_id, post_number: 1)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user