A platform for community discussion. Free, open, simple.
Avoid DB query when there are no mentions.
Guo Xiang Tan4752ddc9087c
diff --git a/lib/pretty_text.rb b/lib/pretty_text.rbindex 9b7463b47f9..67387107b89 100644--- a/lib/pretty_text.rb+++ b/lib/pretty_text.rb@@ -456,6 +456,8 @@ module PrettyTextenddef self.lookup_mentions(names, user_id: nil)+ return {} if names.blank?+sql = <<~SQL(SELECT