From: Haelwenn (lanodan) Monnier Date: Sat, 26 Jan 2019 15:46:20 +0000 (+0100) Subject: Web.MastodonAPI.MastodonAPIController: tag+any bookmark params in a array and flatten it X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=de956b9e04f9c3706d50522bf19a0fb6477feecc;p=akkoma Web.MastodonAPI.MastodonAPIController: tag+any bookmark params in a array and flatten it --- diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex index 4c5f1e7a9..39e0f8492 100644 --- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex @@ -541,7 +541,8 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do local_only = params["local"] in [true, "True", "true", "1"] tags = - ([params["tag"]] ++ (params["any"] || [])) + [params["tag"], params["any"]] + |> List.flatten() |> Enum.uniq() |> Enum.filter(& &1) |> Enum.map(&String.downcase(&1))