Rework task indexing to share code with the main module
[akkoma] / lib / pleroma / search / builtin.ex
index 019713f5274991fbcf1bed4d42f8e62da4e3ba51..3cbe2207ac5c6bdd2949a8af672f919a532649f8 100644 (file)
@@ -14,6 +14,7 @@ defmodule Pleroma.Search.Builtin do
   def search(_conn, %{q: query} = params, options) do
     version = Keyword.get(options, :version)
     timeout = Keyword.get(Repo.config(), :timeout, 15_000)
+    query = String.trim(query)
     default_values = %{"statuses" => [], "accounts" => [], "hashtags" => []}
 
     default_values