Revert "Merge branch 'features/hashtag-column' into 'develop'"
This reverts merge request !2824
This commit is contained in:
parent
b122b6ffa3
commit
3966add048
24 changed files with 70 additions and 163 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue