aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-12-28 12:02:16 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-12-28 12:02:16 +0000
commit3966add048fda791e6893540d8304b0e626ab9f4 (patch)
tree3a3da119eb71a0536bd5f23226834dfea634d74a /lib/pleroma/web/common_api
parentb122b6ffa318af30586f9da0532135959804a6a0 (diff)
downloadpleroma-3966add048fda791e6893540d8304b0e626ab9f4.tar.gz
Revert "Merge branch 'features/hashtag-column' into 'develop'"
This reverts merge request !2824
Diffstat (limited to 'lib/pleroma/web/common_api')
-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)