mirror of
https://github.com/discourse/discourse.git
synced 2025-08-21 19:11:18 +08:00
Avoid DB query when there are no mentions.
This commit is contained in:
parent
a57baeec2a
commit
4752ddc908
1 changed files with 2 additions and 0 deletions
|
@ -456,6 +456,8 @@ module PrettyText
|
|||
end
|
||||
|
||||
def self.lookup_mentions(names, user_id: nil)
|
||||
return {} if names.blank?
|
||||
|
||||
sql = <<~SQL
|
||||
(
|
||||
SELECT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue