Web.MastodonAPI.MastodonAPIController: tag+any bookmark params in a array and flatten it
This commit is contained in:
parent
22f2687f17
commit
de956b9e04
1 changed files with 2 additions and 1 deletions
|
@ -541,7 +541,8 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
||||||
local_only = params["local"] in [true, "True", "true", "1"]
|
local_only = params["local"] in [true, "True", "true", "1"]
|
||||||
|
|
||||||
tags =
|
tags =
|
||||||
([params["tag"]] ++ (params["any"] || []))
|
[params["tag"], params["any"]]
|
||||||
|
|> List.flatten()
|
||||||
|> Enum.uniq()
|
|> Enum.uniq()
|
||||||
|> Enum.filter(& &1)
|
|> Enum.filter(& &1)
|
||||||
|> Enum.map(&String.downcase(&1))
|
|> Enum.map(&String.downcase(&1))
|
||||||
|
|
Loading…
Reference in a new issue