X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Factivity%2Fir%2Ftopics.ex;h=2cdecf1e4c67e667be717d0e5d28cae6ad810efa;hb=acb03d591bea1b20a715201f479f1ad7bf7bb67b;hp=fe2e8cb5c900d7b84f0e92bc1ba42a74c85d685b;hpb=8e1f32e71560c4b36ccbdc3ecf8de8386928305a;p=akkoma diff --git a/lib/pleroma/activity/ir/topics.ex b/lib/pleroma/activity/ir/topics.ex index fe2e8cb5c..2cdecf1e4 100644 --- a/lib/pleroma/activity/ir/topics.ex +++ b/lib/pleroma/activity/ir/topics.ex @@ -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))