mirror of
https://github.com/discourse/discourse.git
synced 2025-03-04 00:00:14 +08:00
Avoid DB query when there are no mentions.
This commit is contained in:
parent
a57baeec2a
commit
4752ddc908
@ -456,6 +456,8 @@ module PrettyText
|
||||
end
|
||||
|
||||
def self.lookup_mentions(names, user_id: nil)
|
||||
return {} if names.blank?
|
||||
|
||||
sql = <<~SQL
|
||||
(
|
||||
SELECT
|
||||
|
Loading…
x
Reference in New Issue
Block a user