2
0
Fork 0
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:
Guo Xiang Tan 2018-11-22 16:42:56 +08:00
parent a57baeec2a
commit 4752ddc908

View file

@ -456,6 +456,8 @@ module PrettyText
end
def self.lookup_mentions(names, user_id: nil)
return {} if names.blank?
sql = <<~SQL
(
SELECT