[#3213] Reinstated DISTINCT clause for hashtag "any" filtering with 2+ terms. Added...
[akkoma] / lib / pleroma / web / mastodon_api / controllers / timeline_controller.ex
index 852bd06956ac3c77b2db9f4730e016169382f541..1fb954a9b1007f695eb13ee5116171fc26db5252 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Web.MastodonAPI.TimelineController do
@@ -134,9 +134,9 @@ defmodule Pleroma.Web.MastodonAPI.TimelineController do
     tags =
       [params[:tag], params[:any]]
       |> List.flatten()
-      |> Enum.uniq()
       |> Enum.reject(&is_nil/1)
       |> Enum.map(&String.downcase/1)
+      |> Enum.uniq()
 
     tag_all =
       params