aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api/utils.ex
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-12-28 12:12:19 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-12-28 12:12:19 +0000
commit607cac1947aaec9ab66de679615b4e14548027a8 (patch)
tree3a3da119eb71a0536bd5f23226834dfea634d74a /lib/pleroma/web/common_api/utils.ex
parentb122b6ffa318af30586f9da0532135959804a6a0 (diff)
parent3966add048fda791e6893540d8304b0e626ab9f4 (diff)
downloadpleroma-607cac1947aaec9ab66de679615b4e14548027a8.tar.gz
Merge branch 'revert-b122b6ff' into 'develop'
Revert "Merge branch 'features/hashtag-column' into 'develop'" See merge request pleroma/pleroma!3222
Diffstat (limited to 'lib/pleroma/web/common_api/utils.ex')
-rw-r--r--lib/pleroma/web/common_api/utils.ex11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex
index 880b5d78f..1c74ea787 100644
--- a/lib/pleroma/web/common_api/utils.ex
+++ b/lib/pleroma/web/common_api/utils.ex
@@ -310,16 +310,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
"context" => draft.context,
"attachment" => draft.attachments,
"actor" => draft.user.ap_id,
- "tag" => Enum.filter(draft.tags, &is_map(&1)) |> Enum.uniq(),
- "hashtags" =>
- draft.tags
- |> Enum.reduce([], fn
- # Why so many formats
- {:name, x}, acc -> if is_bitstring(x), do: [x | acc], else: acc
- {"#" <> _, x}, acc -> if is_bitstring(x), do: [x | acc], else: acc
- x, acc -> if is_bitstring(x), do: [x | acc], else: acc
- end)
- |> Enum.uniq()
+ "tag" => Keyword.values(draft.tags) |> Enum.uniq()
}
|> add_in_reply_to(draft.in_reply_to)
|> Map.merge(draft.extra)