From de956b9e04f9c3706d50522bf19a0fb6477feecc Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sat, 26 Jan 2019 16:46:20 +0100 Subject: [PATCH] Web.MastodonAPI.MastodonAPIController: tag+any bookmark params in a array and flatten it --- lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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))