Insert text representation of hashtags into object["hashtags"]
Includes a new mix task: pleroma.database fill_old_hashtags
This commit is contained in:
parent
8e1f32e715
commit
acb03d591b
22 changed files with 139 additions and 51 deletions
|
|
@ -48,6 +48,10 @@ defmodule Pleroma.Activity.Ir.Topics do
|
|||
tags
|
||||
end
|
||||
|
||||
defp hashtags_to_topics(%{data: %{"hashtags" => tags}}) do
|
||||
Enum.map(tags, fn tag -> "hashtag:" <> tag end)
|
||||
end
|
||||
|
||||
defp hashtags_to_topics(%{data: %{"tag" => tags}}) do
|
||||
tags
|
||||
|> Enum.filter(&is_bitstring(&1))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue